-
-
Notifications
You must be signed in to change notification settings - Fork 90
/
Copy pathsetup.py
94 lines (83 loc) · 2.96 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import re
import codecs
from setuptools import setup, find_packages
version = ''
with open('pigar/version.py', 'r') as f:
version = re.search(
r'__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.M
).group(1)
if not version:
raise RuntimeError('Cannot find version information')
long_description = """
[![](https://img.shields.io/github/workflow/status/damnever/pigar/PyCI?style=flat-square)](https://github.com/damnever/pigar/actions)
- Generating requirements.txt for Python project.
- Handling the difference between different Python versions.
- Jupyter notebook (`*.ipynb`) support.
- Including the import statements/magic from ``exec``/``eval``/``importlib``, doctest of docstring, etc.
- Searching ditributions(packages) by the top level import/module names.
- Checking the latest versions of requirements.
You can find more information on [GitHub](https://github.com/damnever/pigar).
""" # noqa
with codecs.open('CHANGELOG.md', encoding='utf-8') as f:
change_logs = f.read()
install_requires = [
'click>=8.1.3',
'nbformat>=4.4.0',
'aiohttp>=3.8.3',
# The following distributions: ./pigar/_vendor/pip_vendor_requirements.txt
"CacheControl==0.12.11",
"colorama==0.4.5",
"distlib==0.3.6",
"distro==1.7.0",
"packaging==21.3",
"pep517==0.13.0",
"platformdirs==2.5.2",
"requests==2.28.1",
"certifi==2022.09.24",
"urllib3==1.26.12",
"rich==12.5.1",
"resolvelib==0.8.1",
"setuptools>50.0.0", # DO NOT PIN IT.
"tenacity==8.1.0",
"tomli==2.0.1",
]
setup(
name='pigar',
version=version,
description=(
'A fantastic tool to generate requirements for your'
' Python project, and more than that.'
),
long_description=long_description + '\n\n' + change_logs,
long_description_content_type="text/markdown",
project_urls={
'Documentation': 'https://github.com/damnever/pigar',
'Source': 'https://github.com/damnever/pigar',
},
author='damnever',
author_email='[email protected]',
license='The BSD 3-Clause License',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Topic :: Utilities',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
keywords='requirements.txt,automation,tool,module-search',
packages=find_packages(
exclude=["*.tests", "*.tests.*", "tests.*", "tests"]
),
python_requires='>=3.7',
install_requires=install_requires,
include_package_data=True,
entry_points={'console_scripts': [
'pigar=pigar.__main__:main',
]},
)