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

Commit 36591bf

Browse files
committed
only check for ending when looking at available releases
adding example for this
1 parent 7fecfca commit 36591bf

File tree

3 files changed

+43
-4
lines changed

3 files changed

+43
-4
lines changed

examples/Makefile

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ endif
2222
pillow \
2323
tornado \
2424
vulnix \
25-
connexion
25+
connexion \
26+
aiohttp
2627

2728
all: \
2829
awscli_and_requests \
@@ -35,7 +36,8 @@ all: \
3536
pillow \
3637
tornado \
3738
vulnix \
38-
connexion
39+
connexion \
40+
aiohttp
3941

4042
clear: \
4143
awscli_and_requests-clear \
@@ -49,7 +51,8 @@ clear: \
4951
pillow-clear \
5052
tornado-clear \
5153
vulnix-clear \
52-
connexion-clear
54+
connexion-clear \
55+
aiohttp-clear
5356

5457

5558
pypi2nix-clear:
@@ -314,3 +317,26 @@ connexion-clear:
314317
rm -f connexion.txt
315318
rm -f connexion.nix
316319
rm -f connexion_frozen.txt
320+
321+
322+
aiohttp: aiohttp.nix
323+
echo "building and testing aiohttp..."
324+
$(NIX_BUILD) aiohttp.nix -o aiohttp -A interpreter --show-trace -j 1
325+
./aiohttp/bin/python -c 'import aiohttp'
326+
$(NIX_SHELL) aiohttp.nix -A interpreter --run "python -c 'import aiohttp'"
327+
328+
aiohttp.nix: aiohttp.txt $(PYPI2NIX)
329+
echo "generating aiohttp.nix expressions ..."
330+
$(PYPI2NIX) -v --basename aiohttp -r aiohttp.txt -I $(NIX_PATH) -V "3.5"
331+
332+
333+
aiohttp.txt: aiohttp-clear
334+
echo "aiohttp==2.0.6.post1" > aiohttp.txt
335+
echo "pytest-runner" >> aiohttp.txt
336+
echo "setuptools-scm" >> aiohttp.txt
337+
338+
aiohttp-clear:
339+
rm -f aiohttp
340+
rm -f aiohttp.txt
341+
rm -f aiohttp.nix
342+
rm -f aiohttp_frozen.txt

examples/aiohttp_override.nix

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{ pkgs, python }:
2+
3+
self: super: {
4+
5+
"async-timeout" = python.overrideDerivation super."async-timeout" (old: {
6+
buildInputs = old.buildInputs ++ [ self."pytest-runner" ];
7+
});
8+
9+
"pytest-runner" = python.overrideDerivation super."pytest-runner" (old: {
10+
buildInputs = old.buildInputs ++ [ self."setuptools-scm" ];
11+
});
12+
13+
}

src/pypi2nix/stage2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def find_release(wheel_cache_dir, wheel, wheel_data):
251251
# listed in EXTENSIONS variable
252252
for _release in _releases:
253253
for _ext in EXTENSIONS:
254-
if _release['filename'].endswith(_release_version + _ext):
254+
if _release['filename'].endswith(_ext):
255255
wheel_release = _release
256256
break
257257
if wheel_release:

0 commit comments

Comments
 (0)