Skip to content

Commit

Permalink
don't require non-existing modules on win32
Browse files Browse the repository at this point in the history
  • Loading branch information
havardgulldahl committed Sep 3, 2016
1 parent c7a03af commit babf13c
Showing 1 changed file with 29 additions and 17 deletions.
46 changes: 29 additions & 17 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,33 @@
except:
long_desc = ''

REQUIRES = ['requests',
'requests_toolbelt',
'certifi',
'clint',
'python-dateutil',
'humanize',
'six',
'chardet',]

# see https://pythonhosted.org/setuptools/setuptools.html#declaring-extras-optional-features-with-their-own-dependencies
EXTRAS = {
'Qt': [], # required for qt models
'FUSE': [], # required for jotta-fuse
'monitor': ['watchdog',], # required for jotta-monitor
'scanner': [], # optional for jotta-scanner
}

if sys.platform != 'win32':
# all the stuff that doesnt work on windows
REQUIRES.append('lxml')
EXTRAS['scanner'].append('xattr')
EXTRAS['FUSE'].append('fusepy')
EXTRAS['Qt'].append('python-qt4')
else:
print('WARNING: jottalib requires `lxml`, please get it from http://www.lfd.uci.edu/~gohlke/pythonlibs/')


setup(name='jottalib',
version=metadata['version'],
license='GPLv3',
Expand All @@ -46,23 +73,8 @@
url='https://github.com/havardgulldahl/jottalib',
package_dir={'':'src'},
packages=['jottalib', 'jottalib.contrib'],
install_requires=['requests',
'requests_toolbelt',
'certifi',
'clint',
'python-dateutil',
'humanize',
'lxml',
'six',
'chardet',
],
# see https://pythonhosted.org/setuptools/setuptools.html#declaring-extras-optional-features-with-their-own-dependencies
extras_require={
'Qt': ['python-qt4',],
'FUSE': ['fusepy',], # required for jotta-fuse
'monitor': ['watchdog',], # required for jotta-monitor
'scanner': ['xattr',], # optional for jotta-scanner
},
install_requires=REQUIRES,
extras_require=EXTRAS,
entry_points={
'console_scripts': [
'jotta-download = jottalib.cli:download',
Expand Down

0 comments on commit babf13c

Please sign in to comment.