Skip to content
This repository was archived by the owner on Apr 3, 2023. It is now read-only.

Commit c29a9d0

Browse files
committed
Simplify the reading of requirements
1 parent d2ed125 commit c29a9d0

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

setup.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,27 @@
22

33
import ntpapi as project
44

5-
from setuptools import setup
5+
import os
66
from setuptools import find_packages
7-
from pip.req import parse_requirements
8-
from pip.download import PipSession
7+
from setuptools import setup
98

109

11-
def get_file_content(fname):
10+
def read(fname):
1211
try:
13-
return open(fname).read()
12+
return open(os.path.join(os.path.dirname(__file__), fname)).read()
1413
except:
1514
return None
1615

17-
1816
setup(
1917
name=project.NAME,
2018
version=project.VERSION,
2119
description=project.DESCRIPTION,
22-
long_description=get_file_content('README.md'),
20+
long_description=read('README.md'),
2321
author=project.AUTHOR_NAME,
2422
author_email=project.AUTHOR_EMAIL,
2523
url=project.URL,
2624
packages=find_packages(),
27-
install_requires=[str(x.req) for x in
28-
parse_requirements('requirements.txt',
29-
session=PipSession())],
25+
install_requires=read('requirements.txt'),
3026
package_data={
3127
},
3228
license=project.LICENSE,

0 commit comments

Comments
 (0)