fix dependencies for different python versions

This commit is contained in:
Robert Kaussow 2020-03-07 14:31:26 +01:00
parent 7be61d559e
commit c5e94fae7a
4 changed files with 19 additions and 11 deletions

View File

@ -25,6 +25,7 @@ autopep8 = "*"
yapf = "*"
[packages]
zipp = {version = "<2.0.0",markers = "python_version=='3.5'"}
importlib-metadata = {version = "*",markers = "python_version<'3.8'"}
certifi = "*"
chardet = "*"

18
Pipfile.lock generated
View File

@ -1,7 +1,7 @@
{
"_meta": {
"hash": {
"sha256": "6059182d49590067c48d2abe5f4c0dbb6c38d37efe3500fe322ca982c79ddf7d"
"sha256": "9b5892b0ef3fe738ca351da51bd6db18e687fa5389d70342433e1d3f8034bb11"
},
"pipfile-spec": 6,
"requires": {},
@ -240,10 +240,12 @@
},
"zipp": {
"hashes": [
"sha256:aa36550ff0c0b7ef7fa639055d797116ee891440eac1a56f378e2d3179e0320b",
"sha256:c599e4d75c98f6798c509911d08a22e6c021d074469042177c8c86fb92eefd96"
"sha256:c70410551488251b0fee67b460fb9a536af8d6f9f008ad10ac51f615b6a521b1",
"sha256:e0d9e63797e483a30d27e09fffd308c59a700d365ec34e93cc100844168bf921"
],
"version": "==3.1.0"
"index": "pypi",
"markers": "python_version == '3.5'",
"version": "==1.2.0"
}
},
"develop": {
@ -971,10 +973,12 @@
},
"zipp": {
"hashes": [
"sha256:aa36550ff0c0b7ef7fa639055d797116ee891440eac1a56f378e2d3179e0320b",
"sha256:c599e4d75c98f6798c509911d08a22e6c021d074469042177c8c86fb92eefd96"
"sha256:c70410551488251b0fee67b460fb9a536af8d6f9f008ad10ac51f615b6a521b1",
"sha256:e0d9e63797e483a30d27e09fffd308c59a700d365ec34e93cc100844168bf921"
],
"version": "==3.1.0"
"index": "pypi",
"markers": "python_version == '3.5'",
"version": "==1.2.0"
}
}
}

View File

@ -1,7 +1,10 @@
#!/usr/bin/env python3
"""Default package."""
from importlib_metadata import version
try:
from importlib import metadata
except ImportError: # for Python<3.8
import importlib_metadata as metadata
__author__ = "Robert Kaussow"
__project__ = "docker-tidy"
@ -9,4 +12,4 @@ __license__ = "Apache-2.0"
__maintainer__ = "Robert Kaussow"
__email__ = "mail@geeklabor.de"
__url__ = "https://github.com/xoxys/docker-tidy"
__version__ = version("docker-tidy")
__version__ = metadata.version("docker-tidy")

View File

@ -90,10 +90,10 @@ setup(
"six==1.14.0",
"urllib3==1.25.8",
"websocket-client==0.57.0",
"zipp==3.1.0",
"zipp==1.2.0; python_version == '3.5'",
],
dependency_links=[],
setup_requires=["setuptools_scm",],
setup_requires=["setuptools_scm"],
entry_points={"console_scripts": ["docker-tidy = dockertidy.__main__:main"]},
test_suite="tests",
)