Skip to content

Commit 2b4bcf6

Browse files
devaguptjettero
authored andcommitted
Adding changes in setup and fixing pyinstaller version
1 parent cd003de commit 2b4bcf6

File tree

2 files changed

+27
-18
lines changed

2 files changed

+27
-18
lines changed

package-requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
pyinstaller
1+
pyinstaller==3.6
22
pyinstaller-hooks

setup.py

+26-17
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,34 @@
11
from setuptools import setup, find_packages
22
import re
3+
import platform
34

45
try:
56
import distro
67
distro, version, _ = distro.linux_distribution(full_distribution_name=False)
7-
except ModuleNotFoundError:
8+
except ImportError:
89
distro = version = ''
910

11+
platform_name=platform.system()
12+
1013
# Default to CentOS7
1114
data_files = [('/usr/lib/systemd/system', ['pkg/source/hubble.service']),
1215
('/etc/hubble', ['conf/hubble']), ]
16+
dependencies = [
17+
'pycryptodome',
18+
'cryptography',
19+
'pyopenssl>=16.2.0',
20+
'requests>=2.13.0',
21+
'daemon',
22+
'pygit2<0.27.0',
23+
'salt-ssh==2019.2.3',
24+
'gitpython',
25+
'pyinotify',
26+
'cffi',
27+
'croniter',
28+
'vulners',
29+
'ntplib',
30+
'patch==1.*',
31+
]
1332

1433
if distro == 'redhat' or distro == 'centos':
1534
if version.startswith('6'):
@@ -22,6 +41,11 @@
2241
data_files = [('/etc/init.d', ['pkg/hubble']),
2342
('/etc/hubble', ['conf/hubble']), ]
2443

44+
if platform_name == 'Windows':
45+
dependencies.remove('pyinotify')
46+
dependencies.append('argparse')
47+
dependencies.append('pprint')
48+
2549
with open('hubblestack/__init__.py', 'r') as fd:
2650
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
2751
fd.read(), re.MULTILINE).group(1)
@@ -45,22 +69,7 @@
4569
tests_require=[
4670
'mock',
4771
],
48-
install_requires=[
49-
'pycryptodome',
50-
'cryptography',
51-
'pyopenssl>=16.2.0',
52-
'requests>=2.13.0',
53-
'daemon',
54-
'pygit2<0.27.0',
55-
'salt-ssh==2019.2.3',
56-
'gitpython',
57-
'pyinotify',
58-
'cffi',
59-
'croniter',
60-
'vulners',
61-
'ntplib',
62-
'patch==1.*',
63-
],
72+
install_requires=dependencies,
6473
data_files=data_files,
6574
options={
6675
# 'build_scripts': {

0 commit comments

Comments
 (0)