[Bug 1094323] New: packages do not build reproducibly from pip install
http://bugzilla.opensuse.org/show_bug.cgi?id=1094323 Bug ID: 1094323 Summary: packages do not build reproducibly from pip install Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: openSUSE Factory Status: NEW Severity: Normal Priority: P5 - None Component: Development Assignee: bnc-team-screening@forge.provo.novell.com Reporter: bwiedemann@suse.com QA Contact: qa-bugs@suse.de CC: ja+suse@matejcik.cz, toddrme2178@gmail.com Blocks: 1062303 Found By: Development Blocker: --- When working on reproducible builds for openSUSE I found that some packages use pip install which creates .pyc files that contain a random tmp path in them that is different for every build affects at least: python-cluster python-jupyter_bqplot python-jupyter_imatlab_kernel python-PsyLab python-sphinxcontrib-github-alt here is an example diff: /usr/lib/python3.6/site-packages/cluster/method/__pycache__/kmeans.cpython-36.pyc @@ -110,7 +110,7 @@ 000006d0 00 5a 0e 63 6f 6e 74 72 6f 6c 5f 6c 65 6e 67 74 |.Z.control_lengt| 000006e0 68 da 04 69 74 65 6d a9 00 72 13 00 00 00 fa 3a |h..item..r.....:| 000006f0 2f 74 6d 70 2f 70 69 70 2d 69 6e 73 74 61 6c 6c |/tmp/pip-install| -00000700 2d 32 75 38 6a 6f 79 74 76 2f 63 6c 75 73 74 65 |-2u8joytv/cluste| +00000700 2d 6e 69 6c 34 6b 39 77 73 2f 63 6c 75 73 74 65 |-nil4k9ws/cluste| 00000710 72 2f 63 6c 75 73 74 65 72 2f 6d 65 74 68 6f 64 |r/cluster/method| 00000720 2f 6b 6d 65 61 6e 73 2e 70 79 da 08 5f 5f 69 6e |/kmeans.py..__in| 00000730 69 74 5f 5f 2e 00 00 00 73 20 00 00 00 00 01 06 |it__....s ......| IMHO, those .pyc files should not contain any tmp path because it does not exist in the target system anyway. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1094323
http://bugzilla.opensuse.org/show_bug.cgi?id=1094323#c7
--- Comment #7 from Bernhard Wiedemann
http://bugzilla.opensuse.org/show_bug.cgi?id=1094323
http://bugzilla.opensuse.org/show_bug.cgi?id=1094323#c8
Matej Cepl
http://bugzilla.opensuse.org/show_bug.cgi?id=1094323
http://bugzilla.opensuse.org/show_bug.cgi?id=1094323#c9
Bernhard Wiedemann
http://bugzilla.opensuse.org/show_bug.cgi?id=1094323
http://bugzilla.opensuse.org/show_bug.cgi?id=1094323#c10
--- Comment #10 from Bernhard Wiedemann
http://bugzilla.opensuse.org/show_bug.cgi?id=1094323
http://bugzilla.opensuse.org/show_bug.cgi?id=1094323#c11
--- Comment #11 from Matej Cepl
On python-jupyter_imatlab_kernel I found a nice solution to this bug: We need to change the pip install call to use --no-compile instead of --compile and let the normal openSUSE python scripts handle the compilation instead.
You mean that the macro %python3_install \ %{_python_use_flavor python3} \ %__python3 %{py_setup} %{?py_setup_args} install \\\ -O1 --skip-build --force --root %{buildroot} --prefix %{_prefix} in /etc/rpm/macros.python_all should be changed by adding --no-compile to the setup.py install command? We can do that, I suppose. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1094323
http://bugzilla.opensuse.org/show_bug.cgi?id=1094323#c12
--- Comment #12 from Tomáš Chvátal
(In reply to Bernhard Wiedemann from comment #10)
On python-jupyter_imatlab_kernel I found a nice solution to this bug: We need to change the pip install call to use --no-compile instead of --compile and let the normal openSUSE python scripts handle the compilation instead.
You mean that the macro
%python3_install \ %{_python_use_flavor python3} \ %__python3 %{py_setup} %{?py_setup_args} install \\\ -O1 --skip-build --force --root %{buildroot} --prefix %{_prefix}
in /etc/rpm/macros.python_all should be changed by adding --no-compile to the setup.py install command?
We can do that, I suppose.
Nope, what Berhnard means is really pip call (also sidenote we should probably provide these as macros).
From spec:
%python_expand pip%{$python_bin_suffix} install --root %{buildroot} --prefix %{_prefix} --no-deps %{SOURCE0} -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1094323
http://bugzilla.opensuse.org/show_bug.cgi?id=1094323#c14
Matej Cepl
http://bugzilla.opensuse.org/show_bug.cgi?id=1094323
http://bugzilla.opensuse.org/show_bug.cgi?id=1094323#c18
Bernhard Wiedemann
http://bugzilla.opensuse.org/show_bug.cgi?id=1094323
http://bugzilla.opensuse.org/show_bug.cgi?id=1094323#c20
Bernhard Wiedemann
participants (1)
-
bugzilla_noreply@novell.com