-
Notifications
You must be signed in to change notification settings - Fork 13
/
setup.py
51 lines (43 loc) · 1.39 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import os
import sys
from setuptools import setup, find_packages
from pathlib import Path
with open('requirements.txt') as f:
install_reqs = f.read().strip().split('\n')
version = '1.5.0'
if os.name == "posix":
config_dir = '/etc/dgenies'
wsgi_dir = '/var/www/dgenies'
if '--user' in sys.argv:
config_dir = os.path.join(str(Path.home()), ".dgenies")
wsgi_dir = config_dir
data_files = [(config_dir, ['application.properties']),
(config_dir, ['allowed_extensions.yaml']),
(config_dir, ['flask_config.py']),
(config_dir, ['tools.yaml']),
(wsgi_dir, ['dgenies.wsgi'])]
if "readthedoc" in sys.executable:
data_files = []
setup(
name='dgenies',
version=version,
packages=find_packages('src'),
package_dir={'dgenies': 'src/dgenies'},
include_package_data=True,
zip_safe=False,
install_requires=install_reqs,
data_files=data_files,
scripts=['src/bin/dgenies'],
)
else:
setup(
name='dgenies',
version=version,
packages=find_packages('src'),
package_dir={'dgenies': 'src/dgenies'},
include_package_data=True,
zip_safe=False,
install_requires=install_reqs,
data_files=[('.dgenies', ['application.properties'])],
scripts=['src/bin/dgenies'],
)