forked from yihong0618/GitHubPoster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
49 lines (43 loc) · 1.49 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 os import path
from setuptools import find_packages, setup
loc = path.abspath(path.dirname(__file__))
with open(loc + "/requirements.txt") as f:
requirements = f.read().splitlines()
required = []
dependency_links = []
# Do not add to required lines pointing to Git repositories
EGG_MARK = "#egg="
for line in requirements:
if (
line.startswith("-e git:")
or line.startswith("-e git+")
or line.startswith("git:")
or line.startswith("git+")
):
line = line.lstrip("-e ") # in case that is using "-e"
if EGG_MARK in line:
package_name = line[line.find(EGG_MARK) + len(EGG_MARK) :]
repository = line[: line.find(EGG_MARK)]
required.append("%s @ %s" % (package_name, repository))
dependency_links.append(line)
else:
print("Dependency to a git repository should have the format:")
print("git+ssh://[email protected]/xxxxx/xxxxxx#egg=package_name")
else:
required.append(line)
setup(
name="github_poster",
author="yihong0618",
author_email="[email protected]",
url="https://github.com/yihong0618/GitHubPoster",
license="MIT",
version="1.4.0",
description="Make everything a GitHub svg poster and Skyline!",
packages=find_packages(),
include_package_data=True,
install_requires=required,
dependency_links=dependency_links,
entry_points={
"console_scripts": ["github_poster = github_poster.cli:main"],
},
)