Skip to content

Commit

Permalink
requirements from .txt file for install_requires
Browse files Browse the repository at this point in the history
  • Loading branch information
mattclifford1 authored Mar 14, 2023
1 parent 721fa3c commit 68884e0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

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

def dependencies_from_file(file_path):
required = []
with open(file_path) as f:
for l in f.readlines():
l_c = l.strip()
# get not empty lines and ones that do not start with python
# comment "#" (preceded by any number of white spaces)
if l_c and not l_c.startswith('#'):
required.append(l_c)
return required

setuptools.setup(
name="py_rbig",
Expand All @@ -13,6 +24,7 @@
long_description_content_type="text/markdown",
url="https://github.com/jejjohnson/rbig",
packages=setuptools.find_packages(),
install_requires=dependencies_from_file('requirements.txt'),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
Expand Down

0 comments on commit 68884e0

Please sign in to comment.