|
1 | 1 | import re
|
2 | 2 | import setuptools
|
3 | 3 |
|
4 |
| -REQUIREMENTS = 'requirements/main.txt' |
5 |
| -CLI_REQUIREMENTS = 'requirements/cli.txt' |
6 |
| - |
7 | 4 | REQUIRED_PYTHON = (3, 5)
|
8 | 5 |
|
9 |
| -requires = [line.strip('\n') for line in open(REQUIREMENTS).readlines()] |
10 |
| -requires_cli = [line.strip('\n') for line in open(CLI_REQUIREMENTS).readlines()] |
| 6 | +# Load requirements |
| 7 | +REQUIREMENTS = 'requirements/main.txt' |
| 8 | +CLI_REQUIREMENTS = 'requirements/cli.txt' |
| 9 | +REQUIREMENTS = [line.strip('\n') for line in open(REQUIREMENTS).readlines()] |
| 10 | +CLI_REQUIREMENTS = [line.strip('\n') for line in open(CLI_REQUIREMENTS).readlines()] |
11 | 11 |
|
12 | 12 | with open("README.md", "r") as fh:
|
13 |
| - long_description = fh.read() |
| 13 | + LONG_DESCRIPTION = fh.read() |
14 | 14 |
|
15 | 15 | # Trying to load version directly from `search-engine-parser` module attempts
|
16 | 16 | # to load __init__.py which will try to load other libraries not yet installed
|
|
25 | 25 | description="scrapes search engine pages for query titles, descriptions and links",
|
26 | 26 | url="https://github.com/bisoncorps/search-engine-parser",
|
27 | 27 | project_urls={
|
28 |
| - "documentation":"https://search-engine-parser.readthedocs.io/en/latest", |
29 |
| - "source": "https://github.com/bisoncorps/search-engine-parser", |
| 28 | + "Documentation":"https://search-engine-parser.readthedocs.io/en/latest", |
| 29 | + "Source": "https://github.com/bisoncorps/search-engine-parser", |
30 | 30 | },
|
31 | 31 | packages=setuptools.find_packages(),
|
32 |
| - install_requires=requires, |
33 |
| - long_description=long_description, |
| 32 | + install_requires=REQUIREMENTS, |
| 33 | + long_description=LONG_DESCRIPTION, |
34 | 34 | long_description_content_type="text/markdown",
|
35 | 35 | license="MIT",
|
36 | 36 | keywords='\
|
|
54 | 54 | ],
|
55 | 55 | package_data={
|
56 | 56 | '': ['*.*'],
|
| 57 | + 'requirements': ['*.*'], |
57 | 58 | },
|
58 | 59 | include_package_data=True,
|
59 | 60 | extras_require={
|
60 |
| - 'cli': requires_cli |
| 61 | + 'cli': CLI_REQUIREMENTS |
61 | 62 | },
|
62 | 63 | python_requires='>={}.{}'.format(*REQUIRED_PYTHON),
|
63 | 64 | )
|
0 commit comments