PyPy is a fast, compliant alternative implementation of the Python language
(2.7.13). It has several advantages and distinct features:
- Speed: thanks to its Just-in-Time compiler, Python programs often run faster
on PyPy.
- Memory usage: large, memory-hungry Python programs might end up taking less
space than they do in CPython.
- Compatibility: PyPy is highly compatible with existing python code. It
supports ctypes and can run popular python libraries like
twisted and django.
- Sandboxing: PyPy provides the ability to run untrusted code in a fully
secure way.
- Stackless: PyPy can be configured to run in stackless mode, providing
micro-threads for massive concurrency.
- As well as other features.
WWW: http://pypy.org
Note that some standard Python modules are provided as separate ports
as they require additional dependencies. They are available as:
gdbm databases/pypy-gdbm
sqlite3 databases/pypy-sqlite3
tkinter x11-toolkits/pypy-tkinter
Note that PyPy does not implement the following module that would
have been provided as a separate port:
bsddb databases/pypy-bsddb
Mk: switch from PYTHON_PORTVERSION to PYTHON_DISTVERSION
This brings python framework in consistense with handbook recommendations
to prefer DISTVERSION and simplifies adding prerelease versions of
python
PR: 255013
Differential Revision: https://reviews.freebsd.org/D29418
Exp-run by: antoine
Approved by: wen@, no objection from python@ or portmgr@
Remove most expired ports that depend on Python 2.7:
Exceptions are:
- mail/mailman, our listservers still use it
- www/chromium, solely because of popular demand,
upstream is (slowly) working on porting it to Python 3
- ports that have actual patches for Python 3 against
them (Cinnamon and a few unrelated other ports)
- llvm70 and qt5-webengine because they seem to have a lot
of dependencies which need further analysis
- sysutils/uefi-edk2-bhyve because bhyve seems to use them
- python2 and python27 themselves
I'm sure there will be complaints, but the nice thing about
a version control system is that we can revert and adjust things.
(Only the first 15 lines of the commit message are shown above )
lang/pypy3: Fix build with -fno-common
Add an upstream patch to lang/pypy and lang/pypy3 to fix the build of
lang/pypy3 with -fno-common.
MFH: 2020Q3 (implicit, -fno-common fixes, ok by joenum)
Chanse update of devel/libffi
Chase the devel/libffi update
Bump portrevision of all dependent ports to chace shard library version bump
in libffi.
Update LIB_DEPENDS lines where needed to not require a specific version of
libffi.so.
PR: 247028 (for tracking)
lang/pypy3: update to 5.10.1
- bsd.pypy.mk: DISTINFO now needs to be specified based on PYTHON_IMPL
- Change log:
- Fix an overflow in converting int secs to nanosecs (issue 2717 )
- Using kwarg 'flag' to os.setxattr had no effect
- Fix issue 2718 for the REPL
Set LLD_UNSAFE=yes that the port will continue to link with ld.bfd
if /usr/bin/ld is lld, until the issue can be addressed.
PR: 214864
Approved by: portmgr (LLD_UNSAFE blanket)
Sponsored by: The FreeBSD Foundation
lang/pypy(3): update to 5.10, add flavors to ancillary ports
- Consistently use DISTVERSION instead of PORTVERSION (the former is set, not
the latter)
- Only depend on libunwind on x86 arch with FreeBSD >= 11 (fixes ignored build
on arm/ppc)
- Fix python dependency with depreciation of python meta ports
- Remove PYPY_BITS from pkg-plist target, no longer used
- Remove setting of PORTVERSION, DISTVERSION is set in bsd.pypy.mk
- bsd.pypy.mk:
- Define DISTVERSION once, to ensure consistency
- PYPY_DIR: Handle versions with multiple digits
- PYPY_CFFI_VER now differs in value between pypy and pypy3
- bsd.pypy.cffi.mk:
- Add FLAVORS for pypy and pypy3 [1]
- Consistently use PYTHON_IMPL instead of the hard coded "pypy"
- PLIST_FILES: use direct substitution instead of PLIST_SUB
Approved by: portmgr (mat) [1]
Differential Revision: https://reviews.freebsd.org/D13675
Convert Python ports to FLAVORS.
Ports using USE_PYTHON=distutils are now flavored. They will
automatically get flavors (py27, py34, py35, py36) depending on what
versions they support.
There is also a USE_PYTHON=flavors for ports that do not use distutils
but need FLAVORS to be set. A USE_PYTHON=noflavors can be set if
using distutils but flavors are not wanted.
A new USE_PYTHON=optsuffix that will add PYTHON_PKGNAMESUFFIX has been
added to cope with Python ports that did not have the Python
PKGNAMEPREFIX but are flavored.
USES=python now also exports a PY_FLAVOR variable that contains the
(Only the first 15 lines of the commit message are shown above )
For ports that are marked NOT_FOR/ONLY_FOR armv6, also mark them so
on armv7.
This is part one of a multipart commit to bring armv7 ports to parity
with armv6.
Approved by: portmgr (tier-2 blanket)
lang/pypy(3): update to 5.9
- add lubunwind as dependency: required by vmprof
- disable vmprof on FreeBSD 10: missing base support
- implement support for handles with ctypes.CDLL: fix dynamic loading of
shared objects
- enable various tests that were not working on FreeBSD 9
- mark get_profile_path as xfail on FreeBSD
- handle definition of char16_t and char32_t on libc++ for
__cplusplus < 201103L (libstdc++ does not do this)
- other minor fixes
ChangeLog:
- NumPy and Pandas now work on lang/pypy
- Cython 0.27.1 supports more projects with PyPy
- JSON parser improvements decrease memory by up to 50% and increase speed
by up to 15%
- CFFI updated to 1.11.1
lang/pypy(3): update to 5.8
Change Log:
- supports upstream library 2.7.13 and 3.5.3
- critical bugs fixed in shadowstack
- native support for profiling frames in vmprof
- performance improvements for pack* and unpack* structs
- cffi updates to 1.10.1
- numpy 1.13.0 requires at least this version
Mark some ports failing on power64. In cases where the error message
was a stub, provide a real one.
While here, pet portlint.
Approved by: portmgr (tier-2 blanket)
Reported by: swills
bsd.pypy.cffi.mk: unbreak building of cffi ports
To fix conflicting of pypy and pypy3 the PYPY_DIR value was set using
${PORTNAME}, however the same codepath is used for cffi ports who's
${PORTNAME} is not pypy or pypy3.
Fix this by using an intermediate PYTHON_IMPL variable that is conditionally
set to ${PORTNAME} and explicitly set to 'pypy' for cffi ports.
Reported by: pkg-fallout
lang/pypy(3): update to 5.7.1
- add MIT/PSFL multi license
- pass LDSHARED to make environment (work-around assumption around 'gcc')
- add new dependency: pycparser (only required if python is translating)
- removed patches merged upstream
- add patch to remove '-flto' from cflags (base ld doesn't support LTO)
- pypy:
- add patch to fix bad assumption about 'gcc' (instead of 'cc')
- pypy3:
- update BUILD_WRKSRC and PYPY_CFFI_VER
- only supports AMD64
ChangeLog:
- PyPy2 updated to Python 2.7.13
- PyPy3 updated to Python 3.5.3 (beta):
- Not all tests pass
- Asyncio does work
- PyPy2 supports C-extensions: NumPy, Cython and Pandas (amongst others)
- CFFI updated to 1.10
- Many bug-fixes
lang/pypy: IGNORE when building with libressl
Fails to configure with libressl:
[translation:ERROR] Exception: OpenSSL version >= 1.1 not supported yet.
This program requires OpenSSL version 1.0.x, and may also
work with LibreSSL or OpenSSL 0.9.x. OpenSSL 1.1 is quite
some work to update to; contributions are welcome. Sorry,
you need to install an older version of OpenSSL for now.
Make sure this older version is the one picked up by this
program when it runs the compiler.
Approved by: SSL blanket
lang/pypy: update to 5.4.1
ChangeLog:
- Update list of contributors in documentation and LICENSE file, this was
unfortunately left out of 5.4.0.
- Allow tests run with -A to find libm.so even if it is a script not a
dynamically loadable file
- Bump sys.setrecursionlimit() when translating PyPy, for translating with
CPython
- Tweak a float comparison with 0 in backendopt.inline to avoid rounding errors
- Fix for an issue for translating the sandbox
- Fix for and issue where unicode.decode('utf8', 'custom_replace') messed up
the last byte of a unicode string
sometimes
- Update built-in cffi to version 1.8.1
- Explicitly detect that we found as-yet-unsupported OpenSSL 1.1, and crash
translation with a message asking for help
porting it
- Fix a regression where a PyBytesObject was forced (converted to a RPython
object) when not required, reported as
issue #2395
lang/pypy: update to 5.4.0
ChangeLog:
- Incremental improvements to cpyext (passing 99% of numpy's test suite)
- Update cffi to 1.8, supporting "limited API" mode for c-extensions on
CPython >= 3.2
- Improved tooling for PyPy's JIT.
- Various new features, bug fixes and performance improvements, see:
http://pypy.readthedocs.io/en/latest/release-pypy2.7-v5.4.0.html
lang/pypy(3): unbreak on PowerPC.
Unbreak build by:
- correctly detecting PowerPC architecture,
- excluding PowerPC specific assembler code (as there is none), and
- fixing the JIT due to long double == double for PowerPC.
Special thanks to swills who diligently tested multiple iterations of patches
to eventually end up at a solution.
lang/pypy3: update to 5.2.0-alpha1
Changes to lang/pypy3:
- "Rename" from pypy3-devel (functionaly it is a rename, technically pypy3
is a new port and pypy3-devel is deleted).
- Make lang/pypy3 a slave port of lang/pypy
Changes to lang/pypy:
- Use DISTVERSION instead of PORTVERSION (lang/pypy3 is not
PORTVERSION clean)
- Change PYPY_CFFI_VER to include the 'pypy-' prefix (lang/pypy3 has
'pypy3-' as a prefix)
- Only make PYPY_MINMEM the default is ${LOCALBASE}/lang/pypy exists
- Fix build depends for PYPY_MINMEM
- Allow slave port to have custom patch directory
(Only the first 15 lines of the commit message are shown above )
lang/pypy: update to 5.3.1.
- Fix LICENSE for databases/pypy-gdbm (GPLv2+).
- Add support for a slave port (i.e. the upcoming pypy3):
- Allow select variables to be overridden by slave port.
- Allow slave port to have its own distinfo and pkg-plist files.
- Depend on lang/pypy if translating with PYPY or PYPY_MINMEM options.
- Strip bundled cffi .so files.
ChangeLog:
- Highlighted changes
- Major improvements in the C-API compatibility layer
- Complete support for lxml
- Passing 95%+ of numpy's test suite
- Scipy and matplotlib builds and runs
(Only the first 15 lines of the commit message are shown above )
lang/pypy: fix build on i386.
On i386 the registery eip should be used for instruction count, however the
code was using the amd64 register of rip instead.
Reported by: kib@
lang/pypy: unbreak build when pypy isn't installed.
When pypy isn't installed then the port needs to use python to translate
pypy, however all options are not specified since two of the three (the
pypy related options) are not valid. Overcome this by a bit of re-ordering
and abusing OPTIONS_SLAVE in the later case.
Reported by: Andrzej Tobola <ato@iem.pw.edu.pl>
lang/pypy: update to 5.0.0
Changes:
- Drop local mirror
- Drop DIST_SUBDIR (distfile name no longer a generic "release-x.y.z.tar.bz2".
- Add test dependencies (all sub-ports, a la gdbm, sqlite and tkinter)
- Use gmake instead of using sed to transform the Makefile
- Use options helper variables
- Rename regression-test -> do-test
ChangeLog (see http://morepypy.blogspot.co.za/2016/03/pypy-50-released.html):
- Faster and leaner: improved JIT warmed (up to 30% faster) and improved memory
consumption (dropped by about 30%).
- C-API Upgrade: cpyext is much faster and lxml now passes all tests when
using cython compiled components.
- CFFI: ships with cffi-1.5.2.
lang/pypy: unbreak build on i386 and armv6
- Add back PYPY_BITS as it is required to define the names of two files,
depending if pypy is translated for 32 or 64 bit systems [1].
- Change maintainership to python@ [2][3][4]
Reported by: pkg-fallout [1]
Approved by: koobs@ [2]
PR: 204743 [3]
Submitted by: robak@ [4]
lang/pypy: update to 4.0.1
Changes:
- Remove plist-sub PYPY_BITS
- Switch PYPY_VER to PYPY_CFFI_VER
Change Log:
- Highlighted features:
- Update cffi to 1.3.1.
- Update Python implementation to 2.7.10.
- New vectorisation optimisations added to the JIT. To enable add
--jit vec=1 (or --jit vec_all=1 for all vectorisation optimisations).
- Improved JIT warmup time of ~20%.
- Reduced memory consumption by ~20%.
- Numpy's ndarray and numeric dtypes are almost feature complete.
(Only the first 15 lines of the commit message are shown above )
lang/pypy: update to 2.6.1
Changes:
- Add external cffi ports (a la python):
- databases/pypy-gdbm
- databases/pypy-sqlite3
- x11-toolkits/pypy-tkinter
- Add bsd.pypy.mk for consistency between pypy ports.
- Add bsd.pypy.cffi.mk for consistency with external cffi ports.
- Switch back to using $PREFIX/pypy-X.Y (the '-' separator is required to
differentiate between lang/pypy and lang/pypy3)
- Remove all patches (upstreamed, see announcement below)
ChangeLog:
- Bug Fixes
(Only the first 15 lines of the commit message are shown above )
lang/pypy: support cffi, fix and simplify.
* Mark as only for i386, amd64 and armv6 (JIT only supported on those archs)
* Move PyPy dir to pypy26 (for consistency with llvm, et al)
* Drop PYPY_ARCH (unused)
* Use shell to detect ${BUILD_WRKSRC}/Makefile [1]
* Enable CFFI for components that do not have external dependencies
* Update regression-test to align with upstreams procedures
* Complete changes for detecting cpu count via sysctl (upstreamed)
* Properly detect arm (upstreamed) [2]
* Update pkg-plist generation and regenerate
[1] When make evaluates the dependency for pre-build the variable
${BUILD_WRKSRC} is not fully defined (i.e. ${WRKSRC}) so it does not get
properly expanded causing make to never find the correct Makefile.
PR: 202159 [2]
Reviewed by: sbruno (prior version)
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
lang/pypy: Fix build. Temporarily disable CFFI modules
Temporarily disable CFFI module compilation post-build and the shared
CFFI libraries in the packaging lists to due failures finding and
linking tkinter:
Building tk bindings failed.
You can either install development headers package,
add the --without-tk option to skip packaging this
binary CFFI extension, or say --without-cffi.
Traceback (most recent call last):
File "<builtin>/app_main.py", line 75, in run_toplevel
File "/usr/ports/lang/pypy/files/compile_cffi.py", line 15, in <module>
create_cffi_import_libraries(sys.executable, Options(cffi_build_scripts),
py.path.local(basedir))
File
"/wrkdirs/usr/ports/lang/pypy/work/pypy-pypy-295ee98b6928/pypy/tool/release/package.py",
line 84, in create_cffi_import_libraries
raise MissingDependenciesError(module)
MissingDependenciesError: _tkinter/tklib_build.py
This change is being committed on behalf of and in leui of maintainer
providing a comprehensive fix, as they are currently AFK.
Reported by: hawkowl (via IRC, portsmon)
Reviewed by: dbn (maintainer)
Approved by: dbn (maintainer)
lang/pypy: update to 2.6.0
Changes:
* Use pypy.tool.release.package to compile cffi modules.
ChangeLog:
* Python compatibility:
* Improve support for TLS 1.1 and 1.2
* Support for the PYTHONOPTIMIZE environment variable (impacting builtin's
__debug__ property)
* Issues reported with our previous release were resolved after reports
from users on our issue tracker at https://bitbucket.org/pypy/pypy/issues
or on IRC at #pypy.
* New features:
* Add preliminary support for a new lightweight statistical profiler
(Only the first 15 lines of the commit message are shown above )
lang/pypy: update to 2.5.1
Changes:
* Merge pypy-devel into pypy
* Drop pypy-devel (was intended to track pypy-current but no automated
process was implemented)
* Drop upstreamed patches
PR: 199790
Update lang/pypy to 2.3.1.
This backports changes from pypy-devel. Although that port has not gone
through standard QA, there have not been any complaints in the months that
it has been available under pypy-devel.
Update my ports to be compliant with new USES framework and fix other issues.
Changes:
* various: migrate USE_BZIP2 to USES=tar:bzip2
* various: migrate USE_XZ to USES=tar:xz
* multimedia/py-ffmpeg: add and prefer github (GH) as master site
* ports-mgmt/portbuilder: specify license as BSD2CLAUSE (instead of just BSD)
Most ports are updated infrequently so a single batch commit is preferred over
collating changes per port.
Add missing patch (missing `svn add`) for lang/pypy.
Without this patch building and packaging would fail so no PORTREVISION
required.
Reported by: bdrewery, pkg-fallout
Add stage support to lang/pypy, lang/pypy-devel and lang/pypy3-devel.
Also, require a modern compiler that can handle c11. Although this is
not strictly required (just about any C compiler would do) the base GCC
compiler has a memory bug and thus cannot reasonably compile the ports.
Fix the pypy ports.
Be more aggresive in cleaning up temporary directories that pypy leaves
behind in the copied directories (files and directories in __pycache__).
Only .so and .pyc should be left behind in those __pycache__ directories
and no subdirectories.
Also remove the manual requirement for building lang/pypy. Redports
successfully built lang/pypy3-devel (with leftovers) in 19 hours.
Reported by: Redports
Add lang/pypy-devel for non-stable releases of PyPy.
pypy-devel is intended as a staging ground for beta releases and - while
no beta releases are available - snapshots of pypy default branch.
While introducing pypy-devel to build logic has been reworked to better
accomodate pypy3. The lib-python/2.7 and lib_pypy folders are not renamed
after extraction (with only symbolic links used to emulate the structure).
PyPy still expects the standard structure and the symbolic links satisfy
this change.
The devel port was requested by mva@ to better support commercial clients.
Update lang/pypy to 2.1.
Changes:
- Rename the binary, include and library to pypy-2.1 (recommended by mva@).
This is in preparation to introduce PyPy3 (PyPy implementing Python 3.2)
Highlights:
* JIT support for ARM, architecture versions 6 and 7, hard- and soft-float ABI
* Stacklet support for ARM
* Support for os.statvfs and os.fstatvfs on unix systems
* Improved logging performance
* Faster sets for objects
* Interpreter improvements
* During packaging, compile the CFFI based TK extension
* Pickling of numpy arrays and dtypes
(Only the first 15 lines of the commit message are shown above )
Update lang/pypy to 2.1.b2.
Highlights:
* Support for os.statvfs and os.fstatvfs on unix systems.
* Fixed issue 1533: fix an RPython-level OverflowError for
space.float_w(w_big_long_number).
* Fixed issue 1552: GreenletExit should inherit from BaseException.
* Fixed issue 1537: numpypy __array_interface__
* Fixed issue 1238: Writing to an SSL socket in pypy sometimes failed with a
"bad write retry" message.
* distutils: copy CPython's implementation of customize_compiler, dont call
split on environment variables, honour CFLAGS, CPPFLAGS, LDSHARED and
LDFLAGS.
* During packaging, compile the CFFI tk extension.
Fix lang/pypy library detection.
The library detection orginally depended on sys.version however that
tends to change a lot and thus a more robust method is used based on
sys.pypy_version_info.
This fixes installation using distutils and corrects output from sysconfig.
Special thanks to Attila Nagy who reported the issue and tracked down
the root issue (allowing me to deliver a quick solution).
Reported by: Attila Nagy <bra@fsn.hu>
Fix lang/pypy (and INDEX build).
Portlint recommends "USE_GCC=yes+" however such an option breaks everything.
Ignore portlint and use "USE+GCC=4.2+" as the port will compile with just about
any valid C compiler.
Update lang/pypy to 2.1.b
Changes to port:
* Abstract ${BUILDDIR} for files/Makefile
* Remove MAKE_JOBS_SAFE (depreciated)
* Use "USE_GCC=yes+" as recommended by portlint
Highlights:
* Bugfixes to the ARM JIT backend, so that ARM is now an officially
supported processor architecture
* Stacklet support on ARM
* Interpreter improvements
* Various numpy improvements
* Bugfixes to cffi and ctypes
* Bugfixes to the stacklet support
* Improved logging performance
* Faster sets for objects
Update lang/pypy to 2.0.2.
- Track the change in build location (s/2.0.2/2.0.x/g)
- Only tested on amd64 as this is only a point releas
- If SANDBOX fails to build, install pypy-2.0.2 and try again
ChangeLog:
* Fix crash in the JIT when calling external C functions in multithreaded
context.
Approved by: eadler,bdrewery (mentors, implicit)
Fix build of lang/pypy (missing patch).
A patch that tought _sqlite3.py where to find sqlite3.h and sqlite3.so was
not added with the previous commit.
Approved by: eadler,bdrewery (mentors, implicit)
Update lang/pypy to 2.0.1.
Port ChangeLog:
* Sqlite3 added as a dependency
* DIST_SUBDIR no longer used as upstream now releases with a proper tarball
* Added ability to translate with pypy running in restricted memory mode
( faster than python2.7 and uses less memory!)
* Added support for pypy modules that use cffi (_sqlite3 and _curses)
Approved by: eadler,bdrewery (mentors, implicit)
Update lang/pypy to 2.0.b1.
The internals of the port have been substantially reworked:
* All predefined instances can be selected via options [1]
* Optionally use options, if user does not overwrite instance list
* Make translation with pypy an option, if it is available.
* Make memory checking more refined [2]
* Add a Wiki page details lang/pypy
* Fix the test target
* Refactor build target (easier to review, edit)
* Rename patches to prevent churn
[1] Although two are broken upstream and one possibly discontinued
[2] My memory limits appear to be too conservative. Set PYPY_IGNORE_MEM for now
Reviewed by: Kuro <poyopoyo@puripuri.plala.or.jp>, rm@
Approved by: bdrewery (mentor)
- Update to 1.9 [1]
- Detection of insufficient memory [1]
- Change %% SUB vaes from fixed at python 27 to use any installed version of
python [1]
- Fix syntax of non system include "" vs <> [2]
PR: ports/168974 [1]
Submitted by: David Naylor <naylor.b.david@gmail.com> (maintainer) [1]
Reviewed by: scheidel@ (me) [2]