!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

313 Members
https://github.com/nix-community/poetry2nix59 Servers

Load older messages


SenderMessageTime
26 Mar 2022
@mou_bugtracker:matrix.orgmou
In reply to @sephi:matrix.org
Is there a way to use the environment of a derivation to add more files to it right before the Python package is created? I’m creating a derivation for a Django project, and I’d like to collect static files to a directory that’s inside my package. I’m currently doing this by using mkPoetryApplication to create the package, and then have a second mkPoetryApplication with ${appWithoutStatic}/bin/django-admin collectstatic in configurePhase. This works but I was wondering if this is achievable without creating 2 derivations.
i'm newbie with nix, but as far as i can understand, proper way to achieve desired, is to make override with custom build paramaters. poetry2nix uses nixpkgs.buildPythonPackage. So i believe there are plenty of post* hooks, which you can use to add aditional step to your build. You only need to figure out proper way to override resulting derivation.
08:45:18
@asymmetric:matrix.dapp.org.ukasymmetric
In reply to @mou_bugtracker:matrix.org
i'm newbie with nix, but as far as i can understand, proper way to achieve desired, is to make override with custom build paramaters. poetry2nix uses nixpkgs.buildPythonPackage. So i believe there are plenty of post* hooks, which you can use to add aditional step to your build. You only need to figure out proper way to override resulting derivation.
are you replying to me? sorry can't see what you're replying to
08:45:58
@mou_bugtracker:matrix.orgmou
In reply to @asymmetric:matrix.dapp.org.uk
are you replying to me? sorry can't see what you're replying to
to sephi
08:46:38
@mou_bugtracker:matrix.orgmou
In reply to @asymmetric:matrix.dapp.org.uk
could poetry2nix automatically detect and handle this edge case?
I do not know, but if i decided to try, i start by looking into pyproject.toml transformation, where dependencies are converted to buildInputs. poetry build-system.requires should be added to nativeBuildInputs of resulting buildPythonPackage.
08:51:33
@mou_bugtracker:matrix.orgmouThis is just my hypothesis )08:52:09
29 Mar 2022
@FRidh:matrix.orgFRidh joined the room.08:32:08
30 Mar 2022
@sephi:matrix.orgsephi
In reply to @mou_bugtracker:matrix.org
i'm newbie with nix, but as far as i can understand, proper way to achieve desired, is to make override with custom build paramaters. poetry2nix uses nixpkgs.buildPythonPackage. So i believe there are plenty of post* hooks, which you can use to add aditional step to your build. You only need to figure out proper way to override resulting derivation.
Good point, thanks for the hint. I’ll see if I can find something
13:22:04
31 Mar 2022
@adis:blad.isadisbladis mou asymmetric: The core problem would be solved by this upstream PR https://github.com/python-poetry/poetry/pull/2794 01:57:09
1 Apr 2022
@dincio:matrix.orgdincio joined the room.12:44:31
@dincio:matrix.orgdincio Hello everyone. I was trying to compile a project and the derivation failed when encountering the atomics pip package (https://pypi.org/project/atomics/) with this error:ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. 12:46:14
@dincio:matrix.orgdincio * Hello everyone. I was trying to compile a project and the derivation failed when encountering the atomics pip package (https://pypi.org/project/atomics/) with this error: ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. 12:46:33
@k900:0upti.meK900Scroll up 12:53:33
@dincio:matrix.orgdincio * Hello everyone. I was trying to compile a project and the derivation failed when encountering the atomics pip package (https://pypi.org/project/atomics/) with this error: "ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output." 12:53:34
@k900:0upti.meK900There's probably a more useful error there 12:53:39
@dincio:matrix.orgdinciook12:53:49
@dincio:matrix.orgdincioI found this12:55:12
@dincio:matrix.orgdincioRunning command python setup.py egg_info Traceback (most recent call last): File "<string>", line 1, in <module> File "/data/data/com.termux.nix/files/usr/tmp/nix-build-python3.9-atomics-1.0.2.drv-0/pip-req-build-44p_cncj/setup.py", line 6, in <module> import git ModuleNotFoundError: No module named 'git'12:55:22
@dincio:matrix.orgdincio * Running command python setup.py egg_info Traceback (most recent call last):File "<string>", line 1, in <module> File "/data/data/com.termux.nix/files/usr/tmp/nix-build-python3.9-atomics-1.0.2.drv-0/pip-req-build-44p_cncj/setup.py", line 6, in <module> import git ModuleNotFoundError: No module named 'git' 12:55:33
@k900:0upti.meK900Looks like it's missing some dependency 12:55:41
@k900:0upti.meK900You can fix that with an override 12:55:45
@k900:0upti.meK900But it might be a good idea to report this upstream too 12:55:54
@dincio:matrix.orgdincioOk, you mean report upstream using an issue?12:56:11
@k900:0upti.meK900Yes12:57:27
@dincio:matrix.orgdincioOk, thanks for the help12:57:44
2 Apr 2022
@dincio:matrix.orgdincioI've encountered another problem similar to the first one (running nix-build with the suggested configuration). This time, the building of a package called `midi2audio` fails with this error: output = open(markdown_filename).read() FileNotFoundError: [Errno 2] No such file or directory: '/data/data/com.termux.nix/files/usr/tmp/nix-build-python3.9-midi2audio-0.1.1.drv-1/pip-req-build-fbu9mj_8/README.md'14:55:54
@dincio:matrix.orgdincio* I've encountered another problem similar to the first one (running nix-build with the suggested configuration). This time, the building of a package called `midi2audio` fails with this error: ``` output = open(markdown_filename).read() FileNotFoundError: [Errno 2] No such file or directory: '/data/data/com.termux.nix/files/usr/tmp/nix-build-python3.9-midi2audio-0.1.1.drv-1/pip-req-build-fbu9mj_8/README.md' ```14:56:11
@dincio:matrix.orgdincio* I've encountered another problem similar to the first one (running nix-build with the suggested configuration). This time, the building of a package called `midi2audio` fails with this error: ~~~ output = open(markdown_filename).read() FileNotFoundError: [Errno 2] No such file or directory: '/data/data/com.termux.nix/files/usr/tmp/nix-build-python3.9-midi2audio-0.1.1.drv-1/pip-req-build-fbu9mj_8/README.md' ~~~14:56:23
@dincio:matrix.orgdincio* I've encountered another problem similar to the first one (running nix-build with the suggested configuration). This time, the building of a package called `midi2audio` fails with this error: output = open(markdown_filename).read() FileNotFoundError: [Errno 2] No such file or directory: '/data/data/com.termux.nix/files/usr/tmp/nix-build-python3.9-midi2audio-0.1.1.drv-1/pip-req-build-fbu9mj_8/README.md'14:56:36
@k900:0upti.meK900That looks like another upstream issue15:00:42
@mou_bugtracker:matrix.orgmou

Source distribution does not include file referenced from setup.py

❯ tar -ztf midi2audio-0.1.1.tar.gz
midi2audio-0.1.1/
midi2audio-0.1.1/install_fluidsynth_with_soundfonts_osx.sh
midi2audio-0.1.1/midi2audio.egg-info/
midi2audio-0.1.1/midi2audio.egg-info/dependency_links.txt
midi2audio-0.1.1/midi2audio.egg-info/entry_points.txt
midi2audio-0.1.1/midi2audio.egg-info/not-zip-safe
midi2audio-0.1.1/midi2audio.egg-info/PKG-INFO
midi2audio-0.1.1/midi2audio.egg-info/SOURCES.txt
midi2audio-0.1.1/midi2audio.egg-info/top_level.txt
midi2audio-0.1.1/midi2audio.py
midi2audio-0.1.1/PKG-INFO
midi2audio-0.1.1/setup.cfg
midi2audio-0.1.1/setup.py

https://github.com/bzamecnik/midi2audio/blob/2174329842e7c5fc777d900d8222eb6382adea33/setup.py#L13

15:02:03

There are no newer messages yet.


Back to Room ListRoom Version: 6