mirror of
https://github.com/davegallant/rfd.git
synced 2025-08-07 00:58:14 +00:00
fix 0 score bug and pip 10 requirements (#5)
* fix 0 score bug and pip 10 requirements * calculate score for both topic and posts using same function.
This commit is contained in:
10
setup.py
10
setup.py
@@ -1,7 +1,10 @@
|
||||
import io # for python2
|
||||
from os import path
|
||||
from setuptools import setup
|
||||
from pip.req import parse_requirements
|
||||
try: # for pip >= 10
|
||||
from pip._internal.req import parse_requirements
|
||||
except ImportError: # for pip <= 9.0.3
|
||||
from pip.req import parse_requirements
|
||||
from version import __version__ as version
|
||||
|
||||
WORKING_DIR = path.abspath(path.dirname(__file__))
|
||||
@@ -11,7 +14,8 @@ with io.open(path.join(WORKING_DIR, 'README.rst'), encoding='utf-8') as f:
|
||||
long_description = f.read()
|
||||
|
||||
# read requirements.txt and load into list
|
||||
REQUIREMENTS_TXT = parse_requirements(path.join(WORKING_DIR, "requirements.txt"), session='my_session')
|
||||
REQUIREMENTS_TXT = parse_requirements(
|
||||
path.join(WORKING_DIR, "requirements.txt"), session='my_session')
|
||||
REQUIREMENTS = [str(r.req) for r in REQUIREMENTS_TXT]
|
||||
|
||||
setup(
|
||||
@@ -21,7 +25,7 @@ setup(
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
'rfd = rfd.rfd_cli:cli',
|
||||
],
|
||||
],
|
||||
},
|
||||
install_requires=REQUIREMENTS,
|
||||
keywords='cli redflagdeals',
|
||||
|
Reference in New Issue
Block a user