|
1 |
| -import ast |
2 |
| -import io |
3 |
| -import re |
4 |
| - |
5 | 1 | from setuptools import setup, find_packages
|
| 2 | +from os import path |
6 | 3 |
|
7 |
| -with io.open('README.md', 'rt', encoding="utf8") as f: |
8 |
| - readme = f.read() |
9 | 4 |
|
10 |
| -_description_re = re.compile(r'description\s+=\s+(?P<description>.*)') |
| 5 | +this_directory = path.abspath(path.dirname(__file__)) |
| 6 | +with open(path.join(this_directory, "README.md"), encoding="utf-8") as f: |
| 7 | + long_description = f.read() |
11 | 8 |
|
12 |
| -with open('lektor_markdown_table.py', 'rb') as f: |
13 |
| - description = str(ast.literal_eval(_description_re.search( |
14 |
| - f.read().decode('utf-8')).group(1))) |
| 9 | +description = "This plugin adds styling to markdown tables" |
15 | 10 |
|
16 | 11 | setup(
|
17 |
| - author='Shubham Pandey', |
18 |
| - author_email='shubhampcpandey13@gmail.com', |
| 12 | + author="Shubham Pandey", |
| 13 | + author_email="shubhampcpandey13@gmail.com", |
19 | 14 | description=description,
|
20 |
| - keywords='Lektor plugin', |
21 |
| - license='MIT', |
22 |
| - long_description=readme, |
23 |
| - long_description_content_type='text/markdown', |
24 |
| - name='lektor-markdown-table', |
| 15 | + keywords="Lektor plugin", |
| 16 | + license="MIT", |
| 17 | + long_description=long_description, |
| 18 | + long_description_content_type="text/markdown", |
| 19 | + name="lektor-markdown-table", |
25 | 20 | packages=find_packages(),
|
26 |
| - py_modules=['lektor_markdown_table'], |
27 |
| - # url='[link to your repository]', |
28 |
| - version='0.1', |
29 |
| - classifiers=[ |
30 |
| - 'Framework :: Lektor', |
31 |
| - 'Environment :: Plugins', |
32 |
| - ], |
| 21 | + py_modules=["lektor_markdown_table"], |
| 22 | + url="https://github.com/sp35/lektor-markdown-table", |
| 23 | + version="0.1", |
| 24 | + classifiers=["Framework :: Lektor", "Environment :: Plugins", ], |
33 | 25 | entry_points={
|
34 |
| - 'lektor.plugins': [ |
35 |
| - 'markdown-table = lektor_markdown_table:MarkdownTablePlugin', |
| 26 | + "lektor.plugins": [ |
| 27 | + "markdown-table = lektor_markdown_table:MarkdownTablePlugin", |
36 | 28 | ]
|
37 |
| - } |
| 29 | + }, |
38 | 30 | )
|
0 commit comments