diff options
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 29 |
1 files changed, 4 insertions, 25 deletions
@@ -2,42 +2,19 @@ | |||
2 | 2 | ||
3 | from setuptools import setup, find_packages | 3 | from setuptools import setup, find_packages |
4 | import platform | 4 | import platform |
5 | import subprocess | ||
6 | import sys | ||
7 | |||
8 | def is_virtualenv ( ): | ||
9 | import os, os.path | ||
10 | proc = subprocess.Popen(['which', 'add2virtualenv'], stderr=subprocess.PIPE, stdout=subprocess.PIPE) | ||
11 | shell = os.path.dirname(sys.argv[0]) | ||
12 | proc.communicate( ) | ||
13 | has_venv = proc.poll( ) == 0 | ||
14 | print "RESULT", proc.poll( ), has_venv, os.environ.get('VIRTUAL_ENV') | ||
15 | return os.environ.get('VIRTUAL_ENV', has_venv) | ||
16 | 5 | ||
17 | import dexcom_reader | 6 | import dexcom_reader |
7 | |||
18 | def readme(): | 8 | def readme(): |
19 | with open("README.md") as f: | 9 | with open("README.md") as f: |
20 | return f.read() | 10 | return f.read() |
21 | 11 | ||
22 | dataFiles = [ ] | ||
23 | if platform.system( ) == 'Linux': | ||
24 | # prefix = '/' | ||
25 | prefix = '' | ||
26 | dataFiles = [ | ||
27 | (prefix + 'etc/udev/rules.d', ['etc/udev/rules.d/80-dexcom.rules']), | ||
28 | ] | ||
29 | if is_virtualenv( ): | ||
30 | prefix = '' | ||
31 | dataFiles = [ ] | ||
32 | print "should not Use", dataFiles | ||
33 | |||
34 | setup(name='dexcom_reader', | 12 | setup(name='dexcom_reader', |
35 | version='0.0.6', # http://semver.org/ | 13 | version='0.0.6', # http://semver.org/ |
36 | description='Audit, and inspect data from Dexcom G4.', | 14 | description='Audit, and inspect data from Dexcom G4.', |
37 | long_description=readme(), | 15 | long_description=readme(), |
38 | author="Will Nowak", | 16 | author="Will Nowak", |
39 | # I'm just maintaining the package, @compbrain authored it. | 17 | # I'm just maintaining the package, @compbrain authored it. |
40 | # I don't have their email. | ||
41 | author_email="compbrain+dexcom_reader@gmail.com", | 18 | author_email="compbrain+dexcom_reader@gmail.com", |
42 | maintainer="Ben West", | 19 | maintainer="Ben West", |
43 | maintainer_email="bewest+dexcom_reader@gmail.com", | 20 | maintainer_email="bewest+dexcom_reader@gmail.com", |
@@ -54,7 +31,9 @@ setup(name='dexcom_reader', | |||
54 | 'Topic :: Scientific/Engineering', | 31 | 'Topic :: Scientific/Engineering', |
55 | 'Topic :: Software Development :: Libraries' | 32 | 'Topic :: Software Development :: Libraries' |
56 | ], | 33 | ], |
57 | data_files=dataFiles, | 34 | package_data={ |
35 | 'dexcom_reader': ['etc/udev/rules.d/*'] | ||
36 | }, | ||
58 | zip_safe=False, | 37 | zip_safe=False, |
59 | include_package_data=True | 38 | include_package_data=True |
60 | ) | 39 | ) |