-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
58 lines (53 loc) · 1.78 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
50
51
52
53
54
55
56
57
58
from setuptools import setup, find_packages
import os
import re
import subprocess
#base directory
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
with open("README.md", "r") as fh:
long_description = fh.read()
def read_requirements(filename):
"""
Extract requirements from a pip formatted requirements file
"""
filepath = os.path.join(BASE_DIR, filename)
if os.path.isfile(filepath):
with open(filepath) as f:
return [
line.strip()
for line in f
if line.strip() and not line.startswith("#") and not line.startswith("git+")
]
return []
def get_git_dependencies(filename):
"""Extract Git-based dependencies from requirements.txt."""
filepath = os.path.join(BASE_DIR, filename)
git_deps = []
if os.path.isfile(filepath):
with open(filepath) as f:
for line in f:
line = line.strip()
if line.startswith("git+"):
git_deps.append(line)
return git_deps
setup(
name="benchnpin",
version="0.1.1",
license="MIT",
description= "Benchmarking Non-prehensile Interactive Navigation",
long_description=long_description,
long_description_content_type='text/markdown',
url= "https://github.com/IvanIZ/BenchNPIN",
install_requires= read_requirements("requirements.txt"),
dependency_links=get_git_dependencies("requirements.txt"),
python_requires=">=3.10",
packages=find_packages() ,
include_package_data=True,
package_data={"benchnpin": ["**/*.yaml"] ,
"benchnpin": ["**/*.pk"]},
classifiers=[
"Programming Language :: Python :: 3.10",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
)