File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import io
22import os
3- import setuptools
43import shutil
54import tempfile
65
7- from lib .core .settings import VERSION
6+ import pkg_resources
7+ import setuptools
88
9+ from lib .core .settings import VERSION
910
1011current_dir = os .path .abspath (os .path .dirname (__file__ ))
1112with io .open (os .path .join (current_dir , "README.md" ), encoding = "utf-8" ) as fd :
1213 desc = fd .read ()
1314
15+ # Source - https://stackoverflow.com/questions/49689880/proper-way-to-parse-requirements-file-after-pip-upgrade-to-pip-10-x-x
16+ # Posted by sinoroc, modified by community. See post 'Timeline' for change history
17+ # Retrieved 2026-01-23, License - CC BY-SA 4.0
18+
19+ with io .open (os .path .join (current_dir , "requirements.txt" ), encoding = "utf-8" ) as requirements_txt :
20+ install_requires = [
21+ str (requirement )
22+ for requirement
23+ in pkg_resources .parse_requirements (requirements_txt )
24+ ]
25+
1426env_dir = tempfile .mkdtemp (prefix = "dirsearch-install-" )
1527shutil .copytree (os .path .abspath (os .getcwd ()), os .path .join (env_dir , "dirsearch" ))
1628
3042 package_data = {"dirsearch" : ["*" , "db/*" ]},
3143 include_package_data = True ,
3244 python_requires = ">=3.9" ,
45+ install_requires = install_requires ,
3346 classifiers = [
3447 "Programming Language :: Python" ,
3548 "Environment :: Console" ,
You can’t perform that action at this time.
0 commit comments