8000 Read the requirements from the .txt file · Antonille/GeneticAlgorithmPython@1a0c67f · GitHub
[go: up one dir, main page]

Skip to content

Commit 1a0c67f

Browse files
committed
Read the requirements from the .txt file
1 parent 516ac20 commit 1a0c67f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

setup.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
import setuptools
2+
import os
23

34
with open("README.md", "r") as fh:
45
long_description = fh.read()
56

7+
# Dynamically read requirements.txt
8+
this_dir = os.path.abspath(os.path.dirname(__file__))
9+
requirements_path = os.path.join(this_dir, "requirements.txt")
10+
611
# Read the requirements from the requirements.txt file
7-
with open("requirements.txt", "r") as f:
12+
with open(requirements_path, "r") as f:
813
requirements = f.read().splitlines()
914

1015
setuptools.setup(

0 commit comments

Comments
 (0)
0