New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pypy3: init at 6.0.0 #34066
pypy3: init at 6.0.0 #34066
Conversation
To yourself. @domenkozar no longer maintains the package actually. I'll update the maintainers in
Give it the same layout/structure/attributes, just as is done with the CPython 3 interpreters and mostly also with CPython 2.7.
I think we should use respectively
|
@GrahamcOfBorg build pypy3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failure for system: x86_64-darwin
Package ‘pypy3-5.10.1’ in /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/pkgs/development/interpreters/python/pypy/3/default.nix:137 is not supported on ‘x86_64-darwin’, refusing to evaluate.
a) For `nixos-rebuild` you can set
{ nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.
b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
{ allowBroken = true; }
to ~/.config/nixpkgs/config.nix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failure for system: aarch64-linux
File "/build/pypy-pypy-3f6eaa010fce/rpython/rlib/rvmprof/cintf.py", line 19, in <module>
IS_SUPPORTED = detect_cpu.autodetect().startswith('x86')
File "/build/pypy-pypy-3f6eaa010fce/rpython/jit/backend/detect_cpu.py", line 106, in autodetect
return detect_model_from_host_platform()
File "/build/pypy-pypy-3f6eaa010fce/rpython/jit/backend/detect_cpu.py", line 77, in detect_model_from_host_platform
raise ProcessorAutodetectError("unknown machine name %s" % mach)
[translation:ERROR] ProcessorAutodetectError: unknown machine name aarch64
[translation] batch mode, not calling interactive helpers
builder for '/nix/store/c3mmc8c6yfmvwv9jh3w69yzn0w2460s7-pypy3-5.10.1.drv' failed with exit code 1
error: build of '/nix/store/c3mmc8c6yfmvwv9jh3w69yzn0w2460s7-pypy3-5.10.1.drv' failed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failure for system: x86_64-linux
[backendopt:malloc] starting malloc removal
[backendopt:malloc] removed 23008 simple mallocs in total
[backendopt:mergeifblocks] starting to merge if blocks
[47bf2] translation-task}
[translation:info] inserting stack checks...
[47bf2] {translation-task
starting stackcheckinsertion_lltype
[rtyper] -=- specialized 0 more blocks -=-
building of ‘/nix/store/ydrsminz1q71mvkr1qdh9warkr2kv3dr-pypy3-5.10.1.drv’ timed out after 3600 seconds
error: build of ‘/nix/store/ydrsminz1q71mvkr1qdh9warkr2kv3dr-pypy3-5.10.1.drv’ failed
To avoid conflicting with pypy3, as per NixOS#34066 (comment). Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Thanks @FRidh, I think I’ve addressed your feedback.
I dunno if this would actually work on Darwin, but
PyPy doesn’t support aarch64 (https://bitbucket.org/pypy/pypy/issues/2331/armv8-aarch64-or-aarch32-support)—do I need to do something here, and if so, how did
PyPy really does take a long time to build. We could build |
@FRidh Changed, but I think something’s wrong here, or at least incomplete? Before: $ NIX_PATH="nixpkgs=$HOME/nixpkgs" nix-shell --pure -p 'pypy.withPackages (ps: [ps.setuptools])' --run 'pypy -c "import setuptools"'
Traceback (most recent call last):
File "<module>", line 1, in <module>
ImportError: No module named setuptools After: $ NIX_PATH="nixpkgs=$HOME/nixpkgs" nix-shell --pure -p 'pypy.withPackages (ps: [ps.setuptools])' --run 'pypy -m setuptools'
these derivations will be built:
/nix/store/nd18yl4wldiqbd0wx00wzn3k6b78138v-pypy2.7-setuptools-38.4.0.drv
/nix/store/ar45rxvkch12hbcwf2imfs0891yblfjk-pypy-5.10.0-env.drv
building path(s) ‘/nix/store/a30dxjrbb8j04aq80cknk6m8x8nv1p5p-pypy2.7-setuptools-38.4.0’
[…]
Checking .pth file support in /nix/store/a30dxjrbb8j04aq80cknk6m8x8nv1p5p-pypy2.7-setuptools-38.4.0/site-packages/
/nix/store/j8ad3byf8pb8niqnwf38bf6q6rzb64ww-pypy-5.10.0/bin/pypy -E -c pass
TEST FAILED: /nix/store/a30dxjrbb8j04aq80cknk6m8x8nv1p5p-pypy2.7-setuptools-38.4.0/site-packages/ does NOT support .pth files
error: bad install directory or PYTHONPATH
You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from. The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/nix/store/a30dxjrbb8j04aq80cknk6m8x8nv1p5p-pypy2.7-setuptools-38.4.0/site-packages/
and your PYTHONPATH environment variable currently contains:
'/nix/store/a30dxjrbb8j04aq80cknk6m8x8nv1p5p-pypy2.7-setuptools-38.4.0/lib/pypy2.7/site-packages:/nix/store/j8ad3byf8pb8niqnwf38bf6q6rzb64ww-pypy-5.10.0/lib/pypy2.7/site-packages:/nix/store/j8ad3byf8pb8niqnwf38bf6q6rzb64ww-pypy-5.10.0/lib/pypy2.7/site-packages'
Here are some of your options for correcting the problem:
* You can choose a different installation directory, i.e., one that is
on PYTHONPATH or supports .pth files
* You can add the installation directory to the PYTHONPATH environment
variable. (It must then also be on PYTHONPATH whenever you run
Python and want to use the package(s) you are installing.)
* You can set up the installation directory to support ".pth" files by
using one of the approaches described here:
https://setuptools.readthedocs.io/en/latest/easy_install.html#custom-installation-locations
Please make the appropriate changes for your system and try again.
builder for ‘/nix/store/nd18yl4wldiqbd0wx00wzn3k6b78138v-pypy2.7-setuptools-38.4.0.drv’ failed with exit code 1
cannot build derivation ‘/nix/store/ar45rxvkch12hbcwf2imfs0891yblfjk-pypy-5.10.0-env.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/ar45rxvkch12hbcwf2imfs0891yblfjk-pypy-5.10.0-env.drv’ failed
/run/current-system/sw/bin/nix-shell: failed to build all dependencies |
Any progress? |
To avoid conflicting with pypy3, as per NixOS#34066 (comment). Signed-off-by: Anders Kaseorg <andersk@mit.edu>
@FRidh why is it preferable to do this instead of using argument, as it has been done in chromium channels [1]? I found the diff size to be too small to warrant separate files. |
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
The pypy2 changes previously part of this PR have been merged as #40459. So now this is a straightforward addition of pypy3 as a minimally modified copy of pypy2. Can we merge it? (I could rework it so that common packaging code between pypy2 and pypy3 is shared, but was previously directed not to, so I’m leaving it this way unless otherwise instructed.) |
In virtualenv we see the same structure on non-nixos btw. pypy:
python3:
we need to take this into account in our python infrastructure. |
This should fix it: #52568 |
Motivation for this change
Here’s a first draft of a
pypy3
package, mostly copied from the existingpypy27
. Before merging, I want to address the following known issues/questions:pypy27
package I mostly copied, or both?pypy27
andpypy3
?pypy27
’slibPrefix = "pypy5.10"
vs.pypy3
’slibPrefix = "pypy3-5.10"
? Should we change the former to"pypy-5.10"
or"pypy27-5.10"
or"pypy2.7-5.10"
?isPy*
flags should be set bypypy3
? Should we set none of the existing ones and make a newisPypy3
flag? Or should we redefineisPypy
for use by bothpypy27
andpypy3
, and havepypy27
set {isPy2
,isPy27
,isPypy
} whilepypy3
sets {isPy3
,isPy35
,isPypy
}?Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)