-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
49 lines (46 loc) · 1.76 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
from setuptools import setup
from glob import glob
import os
def exclude_files(package_dir, exclude_patterns):
"""
Recursively exclude files matching the exclude_patterns.
This will prevent them from being packaged.
"""
excluded_files = []
for root, _, files in os.walk(package_dir):
for file in files:
if any(file.endswith(pattern) for pattern in exclude_patterns):
# Convert to relative path for packaging exclusion
rel_path = os.path.relpath(os.path.join(root, file), package_dir)
excluded_files.append(rel_path)
return excluded_files
exclude_patterns = (".ipynb", "render.html")
# Find excluded files
package_dir = "src"
exclude_patterns = (".ipynb", "rendered.html")
excluded_files = exclude_files(package_dir, exclude_patterns)
print("Excluded files:", excluded_files)
setup(
name="jupyter_forge",
version="0.1.0",
author="chuongmep",
author_email="[email protected]",
description="A tool for extracting data from Revit ACC",
long_description=open("Readme.md").read(),
long_description_content_type="text/markdown",
url="https://github.com/chuongmep/revit-meows",
package_dir={"": "src"},
include_package_data=True,
# packages=find_packages(where="src"),
data_files=[("src", glob("src/template/*.*", recursive=True)),
("src", glob("src/template/Extensions/*.*", recursive=True))],
install_requires= [open("requirements.txt").read().strip()],
python_requires=">=3.9",
# exclude files
exclude_package_data={"src": excluded_files},
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
]
)