Repository navigation
Expand file tree
/
Copy pathsetup.py
More file actions
75 lines (68 loc) · 2.26 KB
/
Copy pathsetup.py
File metadata and controls
75 lines (68 loc) · 2.26 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
from setuptools import setup, find_packages, Command
from setuptools.command.install import install
import os
import stat
version = "0.0.321"
# Read the long description from the README file
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
def package_files(directory):
data_files = []
for root, dirs, files in os.walk(directory):
for filename in files:
if not (filename.endswith('.pyc') or '.egg-info' in root or '__pycache__' in root):
filepath = os.path.join(root, filename)
dest_dir = os.path.join('obt', root)
data_files.append((dest_dir, [filepath]))
return data_files
#########################################
# these are tricky
# bin_priv has to be data so the files can have the x bit set
# bin_pub goes in scripts (since they are in the venv's path)
#########################################
module_files = package_files('modules')
example_files = package_files('examples')
test_files = package_files('tests')
binpub_files = [f[1][0] for f in package_files("bin_pub")]
binpriv_files = package_files('bin_priv')
claude_files = package_files('claude_skills')
data_files = module_files + example_files + test_files + binpriv_files + claude_files
#########################################
setup(
name="ork.build",
version=version,
author="Michael T. Mayers",
author_email="michael@tweakoz.com",
description="Orkid Build Tools",
long_description=long_description,
long_description_content_type='text/markdown',
url="https://github.com/tweakoz/ork.build",
packages=find_packages(where="scripts"),
package_dir={"": "scripts"},
include_package_data=True,
data_files=data_files,
scripts=binpub_files,
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires='>=3.9',
install_requires=[
'yarl',
'toposort',
'os-release',
'distro',
"twine",
"build",
"conan",
"pip>=24.1",
"GitPython",
"rich",
# Code parsing dependencies
"libclang",
# "mdstat", linux only
#"zfslib", linux only
#"pyudev", linux only
]
)