summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@flameeyes.com>2020-03-22 20:08:32 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-03-23 17:38:07 +0100
commit4a792f80e9e6083f712cfb0f2ebfc92c17ecdf51 (patch)
treeed3d0c9711ba4bae1fd9eca1ff10607e3098ec11
parentotverio2015: remove python-scsi from dependencies. (diff)
downloadglucometerutils-4a792f80e9e6083f712cfb0f2ebfc92c17ecdf51.tar
glucometerutils-4a792f80e9e6083f712cfb0f2ebfc92c17ecdf51.tar.gz
glucometerutils-4a792f80e9e6083f712cfb0f2ebfc92c17ecdf51.tar.bz2
glucometerutils-4a792f80e9e6083f712cfb0f2ebfc92c17ecdf51.tar.lz
glucometerutils-4a792f80e9e6083f712cfb0f2ebfc92c17ecdf51.tar.xz
glucometerutils-4a792f80e9e6083f712cfb0f2ebfc92c17ecdf51.tar.zst
glucometerutils-4a792f80e9e6083f712cfb0f2ebfc92c17ecdf51.zip
-rw-r--r--.travis.yml2
-rw-r--r--setup.py53
2 files changed, 33 insertions, 22 deletions
diff --git a/.travis.yml b/.travis.yml
index d6f7302..5fabe5c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,7 +11,7 @@ matrix:
env: RUN_MYPY=false
install:
- - pip install .[dev]
+ - pip install .[all]
addons:
apt:
diff --git a/setup.py b/setup.py
index f345117..587e695 100644
--- a/setup.py
+++ b/setup.py
@@ -7,14 +7,42 @@ import sys
from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand
-test_required = [
+extras_require = {
+ # These are all the drivers' dependencies. Optional dependencies are
+ # listed as mandatory for the feature.
+ "accucheck_reports": [],
+ "contourusb": ["construct", "hidapi"],
+ "fsinsulinx": ["construct", "hidapi"],
+ "fslibre": ["construct", "hidapi"],
+ "fsoptium": ["pyserial"],
+ "fsprecisionneo": ["construct", "hidapi"],
+ "otultra2": ["pyserial"],
+ "otultraeasy": ["construct", "pyserial"],
+ "otverio2015": ["construct"],
+ "otverioiq": ["construct", "pyserial"],
+ "sdcodefree": ["construct", "pyserial"],
+ "td4277": ["construct", "pyserial", "hidapi"],
+ # These are not drivers, but rather tools and features.
+ "reversing_tools": ["usbmon-tools"],
+}
+
+tests_require = [
"absl-py",
"construct>=2.9",
"pytest>=3.6.0",
"pytest-timeout>=1.3.0",
- "pyserial",
]
+# Development and testing dependencies
+extras_require["dev"] = tests_require + ["pre-commit", "mypy"]
+
+all_require = []
+for extra_require in extras_require.values():
+ all_require.extend(extra_require)
+
+tests_require.extend(all_require)
+extras_require["all"] = all_require
+
class PyTestCommand(TestCommand):
def run_tests(self):
@@ -53,25 +81,8 @@ setup(
packages=find_packages(exclude=["test", "udev"]),
data_files=[("lib/udev/rules", ["udev/69-glucometerutils.rules"]),],
install_requires=["attrs",],
- tests_require=test_required,
- extras_require={
- # These are all the drivers' dependencies. Optional dependencies are
- # listed as mandatory for the feature.
- "accucheck_reports": [],
- "contourusb": ["construct", "hidapi"],
- "fsinsulinx": ["construct", "hidapi"],
- "fslibre": ["construct", "hidapi"],
- "fsoptium": ["pyserial"],
- "fsprecisionneo": ["construct", "hidapi"],
- "otultra2": ["pyserial"],
- "otultraeasy": ["construct", "pyserial"],
- "otverio2015": ["construct"],
- "otverioiq": ["construct", "pyserial"],
- "sdcodefree": ["construct", "pyserial"],
- "td4277": ["construct", "pyserial", "hidapi"],
- # Development and testing dependencies
- "dev": test_required + ["pre-commit", "mypy"],
- },
+ tests_require=tests_require,
+ extras_require=extras_require,
entry_points={"console_scripts": ["glucometer=glucometerutils.glucometer:main"]},
cmdclass={"test": PyTestCommand,},
)