-
-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Xiaochao Dong (@damnever) <[email protected]>
- Loading branch information
Showing
6 changed files
with
54 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,6 @@ jobs: | |
strategy: | ||
matrix: | ||
python-version: | ||
- "3.7" | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ count.py | |
/build/ | ||
/dist/ | ||
.venv* | ||
venv* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
[build-system] | ||
requires = ["setuptools>=69.0", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "pigar" | ||
authors = [{ name = "damnever", email = "[email protected]" }] | ||
description = "A tool to generate requirements.txt for Python project." | ||
readme = "README.md" | ||
keywords = ["requirements.txt", "automation", "tool", "module-search"] | ||
license = { text = "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.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
] | ||
requires-python = ">=3.8" | ||
dependencies = ["click>=8.1", "nbformat>=5.7", "aiohttp>=3.9"] | ||
dynamic = ["version"] | ||
|
||
[project.scripts] | ||
pigar = "pigar.__main__:main" | ||
|
||
[project.gui-scripts] | ||
pigar = "pigar.__main__:main" | ||
|
||
[project.urls] | ||
Documentation = "https://github.com/damnever/pigar" | ||
Source = "https://github.com/damnever/pigar" | ||
|
||
[tool.setuptools] | ||
package-dir = { "pigar" = "pigar" } | ||
include-package-data = true | ||
license-files = ["LICENSE", "pigar/_vendor/pip/LICENSE.txt"] | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["pigar"] | ||
exclude = ["*.tests", "*.tests.*", "tests.*", "tests"] | ||
|
||
[tool.setuptools.dynamic] | ||
version = { attr = "pigar.version.__version__" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,3 @@ | ||
import re | ||
import codecs | ||
from setuptools import setup | ||
|
||
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 = """ | ||
- 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. | ||
Note that pigar is not a package management tool. | ||
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', | ||
'nbformat>=5.7', | ||
'aiohttp>=3.8', | ||
] | ||
|
||
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]', | ||
url="https://github.com/damnever/pigar", | ||
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', | ||
]}, | ||
) | ||
setup() |