Switch version management to use setuptools_scm (#283)

* use setuptools_scm
* update requirements
This commit is contained in:
Peter 2019-12-07 21:00:34 -08:00 committed by GitHub
parent 71eb160572
commit b951c594db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 27 deletions

View File

@ -8,7 +8,6 @@ install:
script: script:
- python setup.py test - python setup.py test
- if [[ ${TRAVIS_PYTHON_VERSION:0:1} == "3" ]]; then pre-commit run --all-files; fi - if [[ ${TRAVIS_PYTHON_VERSION:0:1} == "3" ]]; then pre-commit run --all-files; fi
- env
deploy: deploy:
provider: pypi provider: pypi
user: "__token__" user: "__token__"

View File

@ -1,4 +1,4 @@
reportlab reportlab
Pillow<6 # pillow 6 is not supported by reportlab Pillow
pre-commit pre-commit
pytest pytest

View File

@ -2,27 +2,26 @@
# This file is autogenerated by pip-compile # This file is autogenerated by pip-compile
# To update, run: # To update, run:
# #
# pip-compile # pip-compile requirements.in
# #
aspy.yaml==1.3.0 # via pre-commit aspy.yaml==1.3.0 # via pre-commit
atomicwrites==1.3.0 # via pytest attrs==19.3.0 # via pytest
attrs==19.1.0 # via pytest
cfgv==2.0.1 # via pre-commit cfgv==2.0.1 # via pre-commit
identify==1.4.7 # via pre-commit identify==1.4.8 # via pre-commit
importlib-metadata==0.23 # via pluggy, pre-commit, pytest importlib-metadata==1.2.0 # via pluggy, pre-commit, pytest
more-itertools==7.2.0 # via pytest, zipp more-itertools==8.0.2 # via pytest, zipp
nodeenv==1.3.3 # via pre-commit nodeenv==1.3.3 # via pre-commit
packaging==19.2 # via pytest packaging==19.2 # via pytest
pillow==5.4.1 pillow==6.2.1
pluggy==0.13.0 # via pytest pluggy==0.13.1 # via pytest
pre-commit==1.18.3 pre-commit==1.20.0
py==1.8.0 # via pytest py==1.8.0 # via pytest
pyparsing==2.4.2 # via packaging pyparsing==2.4.5 # via packaging
pytest==5.1.2 pytest==5.3.1
pyyaml==5.1.2 # via aspy.yaml, pre-commit pyyaml==5.2 # via aspy.yaml, pre-commit
reportlab==3.5.26 reportlab==3.5.32
six==1.12.0 # via cfgv, packaging, pre-commit six==1.13.0 # via cfgv, packaging, pre-commit
toml==0.10.0 # via pre-commit toml==0.10.0 # via pre-commit
virtualenv==16.7.5 # via pre-commit virtualenv==16.7.8 # via pre-commit
wcwidth==0.1.7 # via pytest wcwidth==0.1.7 # via pytest
zipp==0.6.0 # via importlib-metadata zipp==0.6.0 # via importlib-metadata

View File

@ -1,18 +1,13 @@
from setuptools import setup from setuptools import setup
version = "3.8.5"
setup( setup(
name="domdiv", name="domdiv",
version=version,
entry_points={"console_scripts": ["dominion_dividers = domdiv.main:main"]}, entry_points={"console_scripts": ["dominion_dividers = domdiv.main:main"]},
package_dir={"": "src"}, package_dir={"": "src"},
packages=["domdiv"], packages=["domdiv"],
install_requires=[ use_scm_version=True,
"reportlab==3.5.26", setup_requires=["setuptools_scm", "pytest-runner"],
"Pillow<6", install_requires=["reportlab", "Pillow"],
], # pillow 6 is not supported by reportlab
setup_requires=["pytest-runner"],
tests_require=["pytest", "six", "pytest-flake8", "pre-commit"], tests_require=["pytest", "six", "pytest-flake8", "pre-commit"],
url="http://domtabs.sandflea.org", url="http://domtabs.sandflea.org",
include_package_data=True, include_package_data=True,

View File

@ -1,3 +1,7 @@
import pkg_resources from pkg_resources import get_distribution, DistributionNotFound
__version__ = pkg_resources.require("domdiv")[0].version try:
__version__ = get_distribution("domdiv").version
except DistributionNotFound:
# package is not installed
pass