diff options
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 33 |
1 files changed, 25 insertions, 8 deletions
@@ -20,6 +20,9 @@ setup file for leap.mx import os import re from setuptools import setup, find_packages +from setuptools import Command + +from pkg.utils.reqs import parse_requirements, is_develop_mode import versioneer versioneer.versionfile_source = 'src/leap/mx/_version.py' @@ -27,8 +30,6 @@ versioneer.versionfile_build = 'leap/mx/_version.py' versioneer.tag_prefix = '' # tags are like 1.2.0 versioneer.parentdir_prefix = 'leap.mx-' -from pkg.utils.reqs import parse_requirements - trove_classifiers = [ 'Development Status :: 3 - Alpha', 'Environment :: No Input/Output (Daemon)', @@ -60,9 +61,6 @@ if len(_version_short) > 0: cmdclass = versioneer.get_cmdclass() -from setuptools import Command - - class freeze_debianver(Command): """ Freezes the version in a debian branch. @@ -113,7 +111,24 @@ else: # be automatically # placed by distutils, using whatever interpreter is # available. - data_files = [("/usr/share/app/", ["pkg/leap_mx.tac"])] + data_files = [("/usr/share/app/", ["pkg/mx.tac"])] + + +requirements = parse_requirements() + +if is_develop_mode(): + print + print ("[WARNING] Skipping leap-specific dependencies " + "because development mode is detected.") + print ("[WARNING] You can install " + "the latest published versions with " + "'pip install -r pkg/requirements-leap.pip'") + print ("[WARNING] Or you can instead do 'python setup.py develop' " + "from the parent folder of each one of them.") + print +else: + requirements += parse_requirements( + reqfiles=["pkg/requirements-leap.pip"]) setup( name='leap.mx', @@ -135,8 +150,10 @@ setup( namespace_packages=["leap"], package_dir={'': 'src'}, packages=find_packages('src'), - #test_suite='leap.mx.tests', - install_requires=parse_requirements(), + test_suite='leap.mx.tests', + tests_require=parse_requirements( + reqfiles=['pkg/requirements-testing.pip']), + install_requires=requirements, classifiers=trove_classifiers, data_files=data_files ) |