Bug 183795 - lang/pypy fails to work in a virtualenv
Summary: lang/pypy fails to work in a virtualenv
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: David Naylor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-08 18:20 UTC by Tom Prince
Modified: 2015-08-01 09:20 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Prince 2013-11-08 18:20:01 UTC
Because the pypy port changes the library paths that pypy uses, it fails to work when used from a virtual env. (This is with pypy-2.1_1).

How-To-Repeat: $ pypy /app/buildslave/dependencies/virtualenv.py test
New pypy executable in test/bin/pypy
Installing Setuptools........
  Complete output from command /tmp/test/bin/pypy setup.py install --single-version-externally-managed --record record:
  Traceback (most recent call last):
  File "app_main.py", line 72, in run_toplevel
  File "setup.py", line 5, in <module>
    import textwrap
ImportError: No module named textwrap
----------------------------------------
..Installing Setuptools...done.
Traceback (most recent call last):
  File "app_main.py", line 72, in run_toplevel
  File "/app/buildslave/dependencies/virtualenv.py", line 2308, in <module>
    main()
  File "/app/buildslave/dependencies/virtualenv.py", line 821, in main
    symlink=options.symlink)
  File "/app/buildslave/dependencies/virtualenv.py", line 961, in create_environment
    install_sdist('Setuptools', 'setuptools-*.tar.gz', py_executable, search_dirs)
  File "/app/buildslave/dependencies/virtualenv.py", line 932, in install_sdist
    filter_stdout=filter_install_output)
  File "/app/buildslave/dependencies/virtualenv.py", line 899, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /tmp/test/bin/pypy setup.py install --single-version-externally-managed --record record failed with error code 1
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-11-09 02:47:45 UTC
Responsible Changed
From-To: freebsd-ports-bugs->dbn

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 David Naylor freebsd_committer freebsd_triage 2013-11-18 19:25:11 UTC
State Changed
From-To: open->analyzed

The issue is with virtualenv hard-coding paths.  A solution will be 
forthcoming.
Comment 3 Bartek Rutkowski freebsd_committer freebsd_triage 2015-07-16 18:26:45 UTC
Is there any update on that? Both pypy ports are severly broken in this regard heavily limiting their usefulness.
Comment 4 David Naylor freebsd_committer freebsd_triage 2015-07-27 05:14:04 UTC
See https://reviews.freebsd.org/D3209
Comment 5 commit-hook freebsd_committer freebsd_triage 2015-08-01 09:07:30 UTC
A commit references this bug:

Author: dbn
Date: Sat Aug  1 09:07:24 UTC 2015
New revision: 393390
URL: https://svnweb.freebsd.org/changeset/ports/393390

Log:
  lang/pypy: simplify port

   - Use upstreams directory layout instead of FreeBSD's preferred directory
     layout [1]
   - Move the pypy installation into $PREFIX/pypy-x.y
   - Remove the ability to build multiple instances (i.e. default to just
     the JIT instance)
   - Install the binary as pypy (instead of pypy-2.6 with a symlink to pypy)
   - Remove the creation of cffi modules (will be outsourced to other ports,
     a la cpython)
   - Remove sqlite3 and gdbm dependencies (i.e. cffi modules)

  PR:             183795
  Differential Revision:  https://reviews.freebsd.org/D3209

Changes:
  head/lang/pypy/Makefile
  head/lang/pypy/files/Makefile
  head/lang/pypy/files/bsd.pypy.inst.mk
  head/lang/pypy/files/compile_cffi.py
  head/lang/pypy/files/patch-lib-python__2.7__distutils__command__install.py
  head/lang/pypy/files/patch-lib-python__2.7__distutils__sysconfig_pypy.py
  head/lang/pypy/files/patch-lib-python__2.7__sysconfig.py
  head/lang/pypy/files/patch-pypy__module__sys__initpath.py
  head/lang/pypy/files/patch-pypy__sandbox__pypy_interactive.py
  head/lang/pypy/files/patch-pypy_tool_release_package.py
  head/lang/pypy/files/patch-rpython__config__support.py
  head/lang/pypy/files/patch-rpython__rtyper__tool__rffi_platform.py
  head/lang/pypy/files/patch-rpython_config_support.py
  head/lang/pypy/files/patch-rpython_rtyper_tool_rffi__platform.py
  head/lang/pypy/files/use.pypy
  head/lang/pypy/pkg-plist
Comment 6 David Naylor freebsd_committer freebsd_triage 2015-08-01 09:20:10 UTC
Fixed in r393390.  Thank you for reporting.