Skip to content

Commit 5afd0f9

Browse files
committed
Use requirements.txt for pip package install_requires
1 parent 50d5aad commit 5afd0f9

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

setup.py

+13-4
Original file line numberDiff line numberDiff line change
@@ -740,15 +740,24 @@ def _picard_packages():
740740

741741

742742
this_directory = os.path.abspath(os.path.dirname(__file__))
743-
with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f:
744-
long_description = f.read()
743+
744+
745+
def _get_description():
746+
with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f:
747+
return f.read()
748+
749+
750+
def _get_requirements():
751+
with open(os.path.join(this_directory, 'requirements.txt'), encoding='utf-8') as f:
752+
return f.readlines()
753+
745754

746755
args = {
747756
'name': PACKAGE_NAME,
748757
'version': PICARD_VERSION_STR_SHORT,
749758
'description': 'The next generation MusicBrainz tagger',
750759
'keywords': 'MusicBrainz metadata tagger picard',
751-
'long_description': long_description,
760+
'long_description': _get_description(),
752761
'long_description_content_type': 'text/markdown',
753762
'url': 'https://picard.musicbrainz.org/',
754763
'package_dir': {'picard': 'picard'},
@@ -772,7 +781,7 @@ def _picard_packages():
772781
'patch_version': picard_patch_version,
773782
},
774783
'scripts': ['scripts/' + PACKAGE_NAME],
775-
'install_requires': ['PyQt5', 'mutagen', 'python-dateutil', 'fasteners'],
784+
'install_requires': _get_requirements(),
776785
'python_requires': '~=3.6',
777786
'classifiers': [
778787
'License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)',

0 commit comments

Comments
 (0)