Skip to content

Commit

Permalink
Fix package dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
thombashi committed Apr 21, 2018
1 parent 8561799 commit bbee657
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import os.path
import sys

from releasecmd import ReleaseCommand
import setuptools


Expand All @@ -26,6 +25,12 @@ def need_pytest():
return set(["pytest", "test", "ptr"]).intersection(sys.argv)


def get_release_command_class():
from releasecmd import ReleaseCommand

return ReleaseCommand


with io.open(os.path.join(MODULE_NAME, "__version__.py"), encoding=ENCODING) as f:
exec(f.read(), pkg_info)

Expand All @@ -45,7 +50,7 @@ def need_pytest():
docs_requires = [line.strip() for line in f if line.strip()]


SETUPTOOLS_REQUIRES = ["setuptools>=20.2.2", "releasecmd"]
SETUPTOOLS_REQUIRES = ["setuptools>=20.2.2"]
PYTEST_RUNNER_REQUIRES = ["pytest-runner"] if need_pytest() else []

setuptools.setup(
Expand All @@ -72,8 +77,9 @@ def need_pytest():
setup_requires=SETUPTOOLS_REQUIRES + PYTEST_RUNNER_REQUIRES,
tests_require=tests_requires,
extras_require={
"test": tests_requires,
"docs": docs_requires,
"release": "releasecmd>=0.0.2",
"test": tests_requires,
},

classifiers=[
Expand All @@ -92,5 +98,5 @@ def need_pytest():
"Topic :: Software Development :: Libraries :: Python Modules",
],
cmdclass={
"release": ReleaseCommand,
"release": get_release_command_class(),
})

0 comments on commit bbee657

Please sign in to comment.