aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Crute <mike@crute.us>2017-10-01 03:49:47 +0000
committerMike Crute <mike@crute.us>2017-10-01 04:11:59 +0000
commit1a2b7f84c46252af96a6042f142a2fbab9c14f56 (patch)
tree1950cd08a3e9096e0de62ce1c067576a7325b8a2
parent3afeff998ca67acc36f3997421b7887fcc748b66 (diff)
downloadpydora-1a2b7f84c46252af96a6042f142a2fbab9c14f56.tar.bz2
pydora-1a2b7f84c46252af96a6042f142a2fbab9c14f56.tar.xz
pydora-1a2b7f84c46252af96a6042f142a2fbab9c14f56.zip
Pick crypto package based on runtime version
-rw-r--r--.travis.yml5
-rwxr-xr-xsetup.py38
2 files changed, 27 insertions, 16 deletions
diff --git a/.travis.yml b/.travis.yml
index d792753..c561420 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,7 +8,8 @@ python:
8before_script: 8before_script:
9 # Travis versions of these are really outdated 9 # Travis versions of these are really outdated
10 - pip install -U mock nose pytest 10 - pip install -U mock nose pytest
11 # Install wheel with pip instead of building from source 11 # Install wheel with pip instead of building from source but only for
12 - pip install cryptography 12 # Python 2 and 3.3
13 - if [[ $TRAVIS_PYTHON_VERSION == 2* || $TRAVIS_PYTHON_VERSION == '3.3' ]]; then pip install cryptography; fi
13script: 14script:
14 - python setup.py validate 15 - python setup.py validate
diff --git a/setup.py b/setup.py
index 431775d..36a17c5 100755
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,6 @@
1#!/usr/bin/env python 1#!/usr/bin/env python
2 2
3import sys
3import itertools 4import itertools
4from setuptools.command.test import test 5from setuptools.command.test import test
5from setuptools import setup, find_packages 6from setuptools import setup, find_packages
@@ -38,6 +39,27 @@ class TestsWithCoverage(test, object):
38 cov.html_report() 39 cov.html_report()
39 40
40 41
42requires = {
43 "setup_requires": [
44 "wheel",
45 "flake8>=3.3",
46 ],
47 "tests_require": [
48 "mock>=2,<3",
49 "coverage>=4.1,<5",
50 ],
51 "install_requires": [
52 "requests>=2,<3",
53 ],
54}
55
56
57if sys.version_info.major == 3 and sys.version_info.minor >= 4:
58 requires["install_requires"].append("blowfish>=0.6.1,<1.0")
59else:
60 requires["install_requires"].append("cryptography>=2,<3")
61
62
41setup( 63setup(
42 name="pydora", 64 name="pydora",
43 version="1.10.0", 65 version="1.10.0",
@@ -51,19 +73,6 @@ setup(
51 cmdclass={ 73 cmdclass={
52 "test": TestsWithCoverage, 74 "test": TestsWithCoverage,
53 }, 75 },
54 setup_requires=[
55 "wheel",
56 "flake8>=3.3",
57 ],
58 tests_require=[
59 "mock>=2,<3",
60 "coverage>=4.1,<5",
61 ],
62 install_requires=[
63 'cryptography>=2,<3;python_version<"3.4"',
64 'blowfish<1.0;python_version>="3.4"',
65 "requests>=2,<3",
66 ],
67 entry_points={ 76 entry_points={
68 "console_scripts": [ 77 "console_scripts": [
69 "pydora = pydora.player:main", 78 "pydora = pydora.player:main",
@@ -84,5 +93,6 @@ setup(
84 "Programming Language :: Python :: 3.6", 93 "Programming Language :: Python :: 3.6",
85 "Topic :: Internet :: WWW/HTTP", 94 "Topic :: Internet :: WWW/HTTP",
86 "Topic :: Multimedia :: Sound/Audio :: Players", 95 "Topic :: Multimedia :: Sound/Audio :: Players",
87 ] 96 ],
97 **requires
88) 98)