-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
49 lines (40 loc) · 1.27 KB
/
setup.py
File metadata and controls
49 lines (40 loc) · 1.27 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
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, __, 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='Unity Backend API',
version='0.1',
description="Webhook host server and developer network",
author='PhaseII Team',
license='Apache 2.0',
packages=[
# Core packages
'api',
# 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,
)