-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.py
More file actions
76 lines (66 loc) · 1.83 KB
/
Copy pathsetup.py
File metadata and controls
76 lines (66 loc) · 1.83 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
from setuptools import setup, find_packages
import shutil
import os
import platform
pyc_dirs = ["bits/sw/assembler", "bits/sw/vmtranslator/"]
pycache_dir = "__pycache__"
def getMajorPythonVersion():
v = platform.python_version().split(".")
return v[0] + v[1]
def setupPyc(dirs):
pycVersion = getMajorPythonVersion()
for dir in dirs:
for f in os.listdir(os.path.join(dir, pycache_dir)):
if f.find(pycVersion) > 0:
baseName = f.split(".")[0] + ".pyc"
shutil.copy(
os.path.join(dir, pycache_dir, f), os.path.join(dir, baseName)
)
print(f)
print("-------------------------------------")
setupPyc(pyc_dirs)
print("-------------------------------------")
setup(
name="bits",
version="1.0",
packages=[
"bits",
"bits.hw",
"bits.util",
"bits.sw.assembler",
"bits.sw.vmtranslator",
"bits.sw.simulator",
],
install_requires=[
"click",
"pyyaml",
"pytest",
"tabulate",
"myhdl",
"wheel",
"PyQt5",
"rich",
],
package_data={"bits.sw.simulator": ["theme/*"]},
include_package_data=True,
data_files=[
(
"bits",
[
"bits/sw/assembler/ASMcode.pyc",
"bits/sw/assembler/ASMparser.pyc",
"bits/sw/assembler/ASM.pyc",
"bits/sw/assembler/ASMsymbolTable.pyc",
"bits/sw/assembler/ASMutil.pyc",
"bits/sw/vmtranslator/Code.pyc",
"bits/sw/vmtranslator/Parser.pyc",
"bits/sw/vmtranslator/VMTranslate.pyc",
"bits/sw/vmtranslator/VMutil.pyc",
],
),
],
entry_points="""
[console_scripts]
bits=bits:cli
""",
)