Skip to content

Commit

Permalink
feat: get all required dependencies in setup.py from issue PyAr#105
Browse files Browse the repository at this point in the history
Signed-off-by: HanslettTheDev <[email protected]>
  • Loading branch information
HanslettTheDev committed Mar 27, 2023
1 parent e08c9d1 commit aa2fb07
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions get_dep.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import subprocess

def get_dependecies() -> list:
freeze = subprocess.Popen("pip freeze", shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
g = freeze[0].decode("utf-8").split("\r\n")
dependencies = [">=".join(x.split("==")) for x in g]
return dependencies
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
__copyright__ = "Copyright (C) 2008-2021 Mariano Reingart"

from distutils.core import setup
from get_dep import get_dependecies
import glob
import os
import subprocess
Expand Down Expand Up @@ -70,6 +71,7 @@
author_email="[email protected]",
url="https://github.com/reingart/pyafipws",
license="LGPL-3.0-or-later",
install_requires=get_dependecies(),
options=opts,
data_files=data_files,
classifiers=[
Expand Down

0 comments on commit aa2fb07

Please sign in to comment.