Skip to content

Commit

Permalink
Define dependencies consistently using environment markers
Browse files Browse the repository at this point in the history
Closes: #1128

Signed-off-by: Konstantinos Smanis <konstantinos.smanis@gmail.com>
  • Loading branch information
KSmanis committed Feb 23, 2022
1 parent ad043c9 commit fa8fb74
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,7 @@ if [ "$1" = "wheel" ]; then
WHEELDIR=dist
else
# Install Python requirements & build inplace
$PREFIX/bin/python setup.py egg_info
$PREFIX/bin/pip install -r pygit2.egg-info/requires.txt
$PREFIX/bin/pip install -r requirements.txt
$PREFIX/bin/python setup.py build_ext --inplace
fi

Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cached-property; python_version < "3.8"
cffi>=1.9.1
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,8 @@ def run(self):
Extension('pygit2._pygit2', pygit2_exts, **libgit2_kw)
]

install_requires = ['cffi>=1.9.1']
if sys.version_info < (3, 8):
install_requires.append('cached-property')
with open('requirements.txt') as f:
install_requires = f.read().splitlines()

setup(
name='pygit2',
Expand Down

0 comments on commit fa8fb74

Please sign in to comment.