Skip to content
This repository was archived by the owner on Sep 9, 2022. It is now read-only.

Commit be0d680

Browse files
committed
Replace broken 'parse_requirements' dependency by a custom command
1 parent 2423802 commit be0d680

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

setup.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# -*- coding: utf-8 -*-
2+
from pathlib import Path
23
from setuptools import setup
3-
try: # Pour pip >= 10
4-
from pip._internal.req import parse_requirements
5-
except ImportError: # For pip <= 9
6-
from pip.req import parse_requirements
4+
5+
HERE = Path(__file__).parent
6+
reqs_path = HERE / 'requirements.txt'
7+
with open(reqs_path) as reqs_file:
8+
requirements = reqs_file.read().splitlines()
79

810
# Based on http://peterdowns.com/posts/first-time-with-pypi.html
911

@@ -18,9 +20,6 @@
1820
# To delete here + 'scripts' dans setup()
1921
# if no command is used in the package
2022

21-
install_reqs = parse_requirements('requirements.txt', session='hack')
22-
requirements = [str(ir.req) for ir in install_reqs]
23-
2423
setup(
2524
name=_NAME,
2625
packages=_PACKAGE_LIST,

0 commit comments

Comments
 (0)