-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
58 lines (48 loc) · 1.5 KB
/
setup.py
File metadata and controls
58 lines (48 loc) · 1.5 KB
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
52
53
54
55
56
57
58
import os
import shutil
from setuptools import Command, setup
class CleanExtCommand(Command):
description = 'Clean all compiled python extensions from the current directory.'
user_options = []
def initialize_options(self) -> None:
pass
def finalize_options(self) -> None:
pass
def run(self) -> None:
print("Removing build directory...")
shutil.rmtree(os.path.abspath("build/"), ignore_errors=True)
for dirname, subdirList, fileList in os.walk(os.path.abspath(".")):
for filename in fileList:
if filename[-3:] == ".so":
fullname = os.path.join(dirname, filename)
print(f"Removing {fullname}")
os.remove(fullname)
setup(
name='RestfulSleep API',
version='1.1',
description="PhaseII Network's powerful API built on Flask and REST",
author='PhaseII Team',
license='Public Domain',
packages=[
# Core packages
'api',
'api.data',
'api.data.endpoints',
'api.services',
'api.services.apr',
'api.services.agx',
'api.services.aqq',
# External communications
'api.external',
# Wrapper scripts, utilities and associated code.
'api.utils',
],
install_requires=[
req for req in open('requirements.txt').read().split('\n') if len(req) > 0
],
cmdclass={
'clean_ext': CleanExtCommand,
},
include_package_data=True,
zip_safe=False,
)