Skip to content
This repository has been archived by the owner on Oct 7, 2022. It is now read-only.

Commit

Permalink
only check for ending when looking at available releases
Browse files Browse the repository at this point in the history
adding example for this
  • Loading branch information
garbas committed Apr 10, 2017
1 parent 7fecfca commit 36591bf
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 4 deletions.
32 changes: 29 additions & 3 deletions examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ endif
pillow \
tornado \
vulnix \
connexion
connexion \
aiohttp

all: \
awscli_and_requests \
Expand All @@ -35,7 +36,8 @@ all: \
pillow \
tornado \
vulnix \
connexion
connexion \
aiohttp

clear: \
awscli_and_requests-clear \
Expand All @@ -49,7 +51,8 @@ clear: \
pillow-clear \
tornado-clear \
vulnix-clear \
connexion-clear
connexion-clear \
aiohttp-clear


pypi2nix-clear:
Expand Down Expand Up @@ -314,3 +317,26 @@ connexion-clear:
rm -f connexion.txt
rm -f connexion.nix
rm -f connexion_frozen.txt


aiohttp: aiohttp.nix
echo "building and testing aiohttp..."
$(NIX_BUILD) aiohttp.nix -o aiohttp -A interpreter --show-trace -j 1
./aiohttp/bin/python -c 'import aiohttp'
$(NIX_SHELL) aiohttp.nix -A interpreter --run "python -c 'import aiohttp'"

aiohttp.nix: aiohttp.txt $(PYPI2NIX)
echo "generating aiohttp.nix expressions ..."
$(PYPI2NIX) -v --basename aiohttp -r aiohttp.txt -I $(NIX_PATH) -V "3.5"


aiohttp.txt: aiohttp-clear
echo "aiohttp==2.0.6.post1" > aiohttp.txt
echo "pytest-runner" >> aiohttp.txt
echo "setuptools-scm" >> aiohttp.txt

aiohttp-clear:
rm -f aiohttp
rm -f aiohttp.txt
rm -f aiohttp.nix
rm -f aiohttp_frozen.txt
13 changes: 13 additions & 0 deletions examples/aiohttp_override.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{ pkgs, python }:

self: super: {

"async-timeout" = python.overrideDerivation super."async-timeout" (old: {
buildInputs = old.buildInputs ++ [ self."pytest-runner" ];
});

"pytest-runner" = python.overrideDerivation super."pytest-runner" (old: {
buildInputs = old.buildInputs ++ [ self."setuptools-scm" ];
});

}
2 changes: 1 addition & 1 deletion src/pypi2nix/stage2.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def find_release(wheel_cache_dir, wheel, wheel_data):
# listed in EXTENSIONS variable
for _release in _releases:
for _ext in EXTENSIONS:
if _release['filename'].endswith(_release_version + _ext):
if _release['filename'].endswith(_ext):
wheel_release = _release
break
if wheel_release:
Expand Down

0 comments on commit 36591bf

Please sign in to comment.