mirror of
https://github.com/lilydjwg/nvchecker.git
synced 2025-03-10 06:14:02 +00:00
switch from setup.py to PEP 517 & setup.cfg
This commit is contained in:
parent
8b929322cb
commit
15020dfcd6
6 changed files with 78 additions and 74 deletions
2
.github/workflows/tests.yaml
vendored
2
.github/workflows/tests.yaml
vendored
|
@ -34,7 +34,7 @@ jobs:
|
||||||
cache-name: cache-pip
|
cache-name: cache-pip
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/pip
|
path: ~/.cache/pip
|
||||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.deps }}-${{ hashFiles('setup.py') }}
|
key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.deps }}-${{ hashFiles('pyproject.toml', 'setup.cfg') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-${{ env.cache-name }}-${{ matrix.deps }}-
|
${{ runner.os }}-${{ env.cache-name }}-${{ matrix.deps }}-
|
||||||
${{ runner.os }}-${{ env.cache-name }}-
|
${{ runner.os }}-${{ env.cache-name }}-
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,6 +1,7 @@
|
||||||
*.egg-info/
|
*.egg-info/
|
||||||
__pycache__/
|
__pycache__/
|
||||||
/build/
|
/build/
|
||||||
|
/dist/
|
||||||
.cache/
|
.cache/
|
||||||
.eggs/
|
.eggs/
|
||||||
*.pyc
|
*.pyc
|
||||||
|
|
|
@ -42,7 +42,7 @@ To install::
|
||||||
|
|
||||||
To use the latest code, you can also clone this repository and run::
|
To use the latest code, you can also clone this repository and run::
|
||||||
|
|
||||||
python3 setup.py install
|
pip install .
|
||||||
|
|
||||||
To see available options::
|
To see available options::
|
||||||
|
|
||||||
|
|
6
pyproject.toml
Normal file
6
pyproject.toml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[build-system]
|
||||||
|
requires = ["setuptools"]
|
||||||
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
|
[tool.pytest.ini_options]
|
||||||
|
# addopts = -n auto
|
72
setup.cfg
72
setup.cfg
|
@ -1,5 +1,71 @@
|
||||||
|
# The complex upload command:
|
||||||
|
# rm -rf dist && python -m build --sdist && twine check dist/* && twine upload -s dist/*
|
||||||
|
|
||||||
|
[metadata]
|
||||||
|
name = nvchecker
|
||||||
|
version = attr: nvchecker.__version__
|
||||||
|
author = lilydjwg
|
||||||
|
author_email = lilydjwg@gmail.com
|
||||||
|
description = New version checker for software
|
||||||
|
license = MIT
|
||||||
|
keywords = new, version, build, check
|
||||||
|
url = https://github.com/lilydjwg/nvchecker
|
||||||
|
long_description = file: README.rst
|
||||||
|
long_description_content_type = text/x-rst
|
||||||
|
platforms = any
|
||||||
|
|
||||||
|
classifiers =
|
||||||
|
Development Status :: 5 - Production/Stable
|
||||||
|
Environment :: Console
|
||||||
|
Intended Audience :: Developers
|
||||||
|
Intended Audience :: System Administrators
|
||||||
|
License :: OSI Approved :: MIT License
|
||||||
|
Operating System :: OS Independent
|
||||||
|
Programming Language :: Python
|
||||||
|
Programming Language :: Python :: 3
|
||||||
|
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
|
||||||
|
Topic :: Internet
|
||||||
|
Topic :: Internet :: WWW/HTTP
|
||||||
|
Topic :: Software Development
|
||||||
|
Topic :: System :: Archiving :: Packaging
|
||||||
|
Topic :: System :: Software Distribution
|
||||||
|
Topic :: Utilities
|
||||||
|
|
||||||
|
[options]
|
||||||
|
zip_safe = True
|
||||||
|
|
||||||
|
packages = find_namespace:
|
||||||
|
install_requires =
|
||||||
|
setuptools; python_version<"3.8"
|
||||||
|
tomli
|
||||||
|
structlog
|
||||||
|
appdirs
|
||||||
|
tornado>=6
|
||||||
|
pycurl
|
||||||
|
scripts =
|
||||||
|
scripts/nvchecker-ini2toml
|
||||||
|
scripts/nvchecker-notify
|
||||||
|
|
||||||
|
[options.packages.find]
|
||||||
|
exclude = tests, build*, docs*
|
||||||
|
|
||||||
|
[options.extras_require]
|
||||||
|
vercmp =
|
||||||
|
pyalpm
|
||||||
|
pypi =
|
||||||
|
packaging
|
||||||
|
htmlparser =
|
||||||
|
lxml
|
||||||
|
|
||||||
|
[options.entry_points]
|
||||||
|
console_scripts =
|
||||||
|
nvchecker = nvchecker.__main__:main
|
||||||
|
nvtake = nvchecker.tools:take
|
||||||
|
nvcmp = nvchecker.tools:cmp
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
ignore = E111, E302, E501
|
ignore = E111, E302, E501
|
||||||
|
|
||||||
[tool:pytest]
|
|
||||||
# addopts = -n auto
|
|
||||||
|
|
69
setup.py
69
setup.py
|
@ -1,69 +0,0 @@
|
||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
from setuptools import setup, find_namespace_packages
|
|
||||||
import nvchecker
|
|
||||||
|
|
||||||
# The complex upload command:
|
|
||||||
# rm -rf dist && python setup.py sdist && twine check dist/* && twine upload -s dist/*
|
|
||||||
|
|
||||||
setup(
|
|
||||||
name = 'nvchecker',
|
|
||||||
version = nvchecker.__version__,
|
|
||||||
author = 'lilydjwg',
|
|
||||||
author_email = 'lilydjwg@gmail.com',
|
|
||||||
description = 'New version checker for software',
|
|
||||||
license = 'MIT',
|
|
||||||
keywords = 'new version build check',
|
|
||||||
url = 'https://github.com/lilydjwg/nvchecker',
|
|
||||||
long_description = open('README.rst', encoding='utf-8').read(),
|
|
||||||
long_description_content_type = 'text/x-rst',
|
|
||||||
platforms = 'any',
|
|
||||||
zip_safe = True,
|
|
||||||
|
|
||||||
packages = find_namespace_packages(exclude=['tests', 'build*', 'docs*']),
|
|
||||||
install_requires = ['setuptools; python_version<"3.8"', 'tomli', 'structlog', 'appdirs', 'tornado>=6', 'pycurl'],
|
|
||||||
extras_require = {
|
|
||||||
'vercmp': ['pyalpm'],
|
|
||||||
'pypi': ['packaging'],
|
|
||||||
'htmlparser': ['lxml'],
|
|
||||||
},
|
|
||||||
tests_require = [
|
|
||||||
'pytest',
|
|
||||||
'pytest-asyncio',
|
|
||||||
'pytest-httpbin',
|
|
||||||
'flaky',
|
|
||||||
],
|
|
||||||
entry_points = {
|
|
||||||
'console_scripts': [
|
|
||||||
'nvchecker = nvchecker.__main__:main',
|
|
||||||
'nvtake = nvchecker.tools:take',
|
|
||||||
'nvcmp = nvchecker.tools:cmp',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
scripts = [
|
|
||||||
'scripts/nvchecker-ini2toml',
|
|
||||||
'scripts/nvchecker-notify',
|
|
||||||
],
|
|
||||||
|
|
||||||
classifiers = [
|
|
||||||
"Development Status :: 5 - Production/Stable",
|
|
||||||
"Environment :: Console",
|
|
||||||
"Intended Audience :: Developers",
|
|
||||||
"Intended Audience :: System Administrators",
|
|
||||||
"License :: OSI Approved :: MIT License",
|
|
||||||
"Operating System :: OS Independent",
|
|
||||||
"Programming Language :: Python",
|
|
||||||
"Programming Language :: Python :: 3",
|
|
||||||
"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",
|
|
||||||
"Topic :: Internet",
|
|
||||||
"Topic :: Internet :: WWW/HTTP",
|
|
||||||
"Topic :: Software Development",
|
|
||||||
"Topic :: System :: Archiving :: Packaging",
|
|
||||||
"Topic :: System :: Software Distribution",
|
|
||||||
"Topic :: Utilities",
|
|
||||||
],
|
|
||||||
)
|
|
Loading…
Add table
Reference in a new issue