-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
41 lines (38 loc) · 1.63 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
import os
from setuptools import setup, find_packages
def parse_requirements(filename):
"""Load requirements from a pip requirements file"""
with open(filename, "r", encoding="utf-8") as file:
return [line.strip() for line in file if line and not line.startswith("#")]
def parse_extra_requirements(directory):
"""Load extra requirements from multiple files"""
extras = {}
if os.path.exists(directory):
for req_file in os.listdir(directory):
if req_file.endswith(".txt"): # Only process .txt files
name = os.path.splitext(req_file)[0] # e.g., 'language' from 'language.txt'
extras[name] = parse_requirements(os.path.join(directory, req_file))
return extras
setup(
name="gst-python-ml",
version="0.1.0",
packages=find_packages(where="plugins/python"),
package_dir={"": "plugins/python"},
include_package_data=True,
description="An ML package for GStreamer",
long_description=open("README.md", encoding="utf-8").read(),
long_description_content_type="text/markdown",
license="LGPL-3.0",
license_files=["COPYING"],
author="Aaron Boxer",
author_email="[email protected]",
url="https://github.com/collabora/gst-python-ml",
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Operating System :: OS Independent",
],
python_requires=">=3.6",
install_requires=parse_requirements("requirements.txt"), # Base requirements
extras_require=parse_extra_requirements("requirements"), # Grouped dependencies
)