We backported an upstream patch for NPN detection (bpo-30622) in r461919 but it is not enough.
This port still fails to build with OpenSSL 1.1.0.
Tested by: brnrd, sunpoet (myself)
- Set PORTNAME to python and add PKGNAMESUFFIX
- Update Makefile and PLIST to be similar with python36
- Sort USES
- Remove CPE_*: all of them are default values
- Update PLIST_FILES: do not use %%
- Fix shebang:
- Update SHEBANG_FILES
- Remove over-patched shebang fix of Lib/cgi.py
- Update http:// links in Makefile comments and patch files
Changes: https://docs.python.org/3.4/whatsnew/changelog.html
Security: 0fe70bcd-2ce3-46c9-a64b-4a7da097db07
MFH: 2018Q1
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
current python flavor. It can be used in dependency lines when the
port itself is not python flavored. For example, deskutils/calibre.
By default, all the flavors are generated. To only generate flavors
for the versions in PYTHON2_DEFAULT and PYTHON3_DEFAULT, define
BUILD_DEFAULT_PYTHON_FLAVORS in your make.conf.
In all the ports with Python dependencies, the *_DEPENDS entries MUST
end with the flavor so that the framework knows which to build/use.
This is done by appending '@${PY_FLAVOR}' after the origin (or
@${FLAVOR} if in a Python module with Python flavors, as the content
will be the same). For example:
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR}
PR: 223071
Reviewed by: portmgr, python
Sponsored by: Absolight
Differential Revision: https://reviews.freebsd.org/D12464
A stray '.' somehow made it past my testing.
Do *not* bump portrevision as this only affects the packaging/stage
of these ports on mips/armv6 or other cross compiled targets.
PR: 221202
Reported by: antoine
this environment in poudriere, CC is not set to the default of /usr/bin/cc and
a cross-compile toolchain is used. We need to hand edit this so that the run
time configuration for python matches what the FreeBSD base system provides.
PR: 208282
Submitted by: manu
Approved by: portmgr (mat)
Use readline from ports (USES= readline:port) and patch
setup.py to ignore readline from base. The patch is necessary for
FreeBSD < 1100000, as after this the readline library became an
INTERNALLIB, see base r268461 [1]
Link devel/readline against termcapw instead of termcap is part of
this change, see ports r444463 [2]
Note that this is the **ports** approach for getting Python curses
module working with Unicode. The other way is splitting libncurses
into separate libncurses and libtinfo in base, for which an open
issue exists [3].
Apart from Python language ports, at least www/rtv and
sysutils/py-ranger ports have been tested to work correctly
(display Unicode) after this change.
[1] https://svnweb.freebsd.org/changeset/base/268461
[2] https://svnweb.freebsd.org/changeset/ports/444463
[3] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197317
PR: 171246, 197317
Reported by: Vitaly Magerya <vmagerya gmail com>
Reviewed by: garga, koobs, miwi, sunpoet
Approved by: garga (mentor), sunpoet (python, with hat)
Differential Revision: https://reviews.freebsd.org/D11127
Users with a GDB that supports [1] Python extensions will automatically
load the extra debugging extensions when debugging programs that are
linked with libpythonX.Y.so.foo.
This enables extensions like 'py-bt' and 'py-frame' as described in
the Fedora Wiki Article: Easier Python Debugging [2], which can be
useful for debugging Python program state from crashes in C extensions,
for example.
[1] PYTHON option enabled in devel/gdb
[2] https://fedoraproject.org/wiki/Features/EasierPythonDebugging
PR: 203021
Submitted by: cem
Reviewed by: mat, koobs (python)
Approved by: koobs (python)
Differential Revision: D10398
This patch was submitted to upstream libffi and from there to upstream
libtool, but it doesn't do anything. The original patch committed in
r158131 did do something but when it was no longer needed it was changed
into something that doesn't make sense in r221521 instead of being removed.
Remove it now before it causes more confusion.
Add patch for integer overflow in zipimport module to all our python ports.
While I'm here, get rid of -f flag in ${RM} invocation, because ${RM} already
expands to rm -f, so in result we are getting something like:
/bin/rm -f -f /wrkdirs/usr/ports/lang/python35/work/stage/usr/local/lib/libpython3.so
PR: 210325
Submitted by: Vladimir Krstulja <vlad-fbsd@acheronmedia.com>
Security: 1d0f6852-33d8-11e6-a671-60a44ce6887b
With hat: python
check in pyport.h for working around a very old ctype issue.
If the workaround for this issue is enabled, pyport.h redefines
toupper() and some other ctype macros, and this wreaks havoc when
including newer libc++ headers (or any other system header which tries
to declare those functions).
Approved by: portmgr (antoine)
PR: 208486
MFH: 2016Q2
In certain situations, file references (.py[co]) for Python files that
fail to compile with compileall() are still added to distutils --record
output.
This output is used for pkg-plist generation and must only contain
references to files that will be installed.
One example of a failure condition is when a Python 2/3 compatible
package containing a file containing Python 3.x only code is built with
Python 2.x, such as Gunicorn's _gaiohttp.py [1]
This change backports patches submitted against upstream issue 20397 [2]
that has not yet been committed.
- For Python 2.7 and 3.5, backport both install_lib and test
- For Python 3.2, 3.3 and 3.4, only backport install_lib
[1] https://svnweb.freebsd.org/changeset/ports/404558
[2] https://bugs.python.org/issue20397
Thank you to Brendan Molloy for producing and submitting the patches
against upstream sources.
Reviewed by: sbz (python)
MFH: 2016Q1
Differential Revision: D4832
There are some inefficiencies in python.mk that significantly slow down
full tree scanning. The use of bmake to obtain the current version of
a specific python is responsible for the majority of the slow done.
This commit splits out the PYTHON_PORTVERSION definition (which is the
same as the lang/python* PORTVERSION) into separate files. With this
change, python.mk can simple include the makefile fragment instead of
spawning a new instance of make.
Different Revision: https://reviews.freebsd.org/D4660
Approved by: antoine (python), mva (python)
non-default Python versions:
- Add pyXY-{sqlite3,gdbm,tkinter} ports for generating binary packages
- Improve/add pkg-message to point users to install respective packages of
separated Python standard modules
- Add COMMENT to explicitly show the Python version that package should be
used with
- Simplify version-related PYTHON_* for lang/python35
Reviewed by: koobs
Differential Revision: https://reviews.freebsd.org/D4170
Parser/pgen code intermittently and non-deterministically fails
at build time causing errors including, among others:
* Parser/pgen.o: file not recognized: File truncated
* pgenmain.c:(.text+0x244): undefined reference to `_Py_pgen'
This is apparently due to incorrect uses of recursive make [1] which
was fixed in the upstream Python 'default' (3.5) branch [2].
This change marks all Python port versions as MAKE_JOBS_UNSANFE until
the the original changeset [1] and the resulting regression in
cross-builds [3], whos fix is still pending, can be backported.
[1] https://bugs.python.org/issue22359
[2] https://hg.python.org/cpython/rev/c2a53aa27cad
[3] https://bugs.python.org/issue22625
PR: 200622
Reported by: marino
MFH: 2015Q3
- Replace ${MASTER_SITE_FOO} with FOO.
- Merge MASTER_SITE_SUBDIR into MASTER_SITES when possible. (This means 99.9%
of the time.)
- Remove occurrences of MASTER_SITE_LOCAL when no subdirectory was present and
no hint of what it should be was present.
- Fix some logic.
- And generally, make things more simple and easy to understand.
While there, add magic values to the FESTIVAL, GENTOO, GIMP, GNUPG, QT and
SAMBA macros.
Also, replace some EXTRACT_SUFX occurences with USES=tar:*.
Checked by: make fetch-urlall-list
With hat: portmgr
Sponsored by: Absolight
As per lang/python27 (r377581):
- Add BROKEN for i386 without LIBFFI option, and add upstream
issue references.
While I'm here, clean up after the LIBFFI option addition:
- Sort options variables: OPTIONS_* and *_DESC
- Use OPTIONS helpers
- Reduce diffs between lang/python* ports
Remove patches and hacks that were used to work around the previous
situation
This allows to stage more ports as a regular user
Differential Revision: https://reviews.freebsd.org/D703
Reviewed by and discussed with: bapt
With hat: portmgr
Backport fix [1] for upstream Python Issue #21704 [2]: Fix build error for
_multiprocessing when semaphores are not available.
The symptom was originally reported by RedPorts 8.4-QAT/i386,
ultimately resulting in a packaging error:
...
checking for sem_open... yes
checking for sem_timedwait... yes
checking for sem_getvalue... yes
checking for sem_unlink... yes
...
checking whether POSIX semaphores are enabled... no
checking for broken sem_getvalue... yes
...
*** WARNING: renaming "_multiprocessing" since importing it failed:
build/lib.freebsd-8.4-RELEASE-i386-3.4/_multiprocessing.so: Undefined
symbol "_PyMp_sem_unlink"
...
pkg-static: lstat(/work/a/ports/lang/python34/work/stage/usr/local/lib/
python3.4/lib-dynload/_multiprocessing.so): No such file or directory
Something is funny for Jail-based systems when it comes to host/jail
semaphore detection. A config.log would be handy to help determine why.
[1] http://hg.python.org/cpython/rev/f618f6739200
[2] http://bugs.python.org/issue21704
Bump PORTREVISION, as prior to the previous change that fixed upstream Issue
#21166, Python builds could be potentially polluted by the host environment
which could caused runtime issues because of ABI differences.
Backport fix for upstream Issue #21166:
Prevent possible segfaults and other random failures of python
--generate-posix-vars in pybuilddir.txt build target by ensuring
that pybuilddir.txt is always regenerated when configure is run and
that the newly built skeleton python does not inadvertently import
modules from previously installed instances. [1]
This changeset has been committed for release in 2.7.9, 3.4.2, and 3.5.0.
A HUGE thank you to Ned Deily from the Python Core Development Team
for helping to identify the underlying cause, produce a fix and
wonderfully document the explanation.
[1] http://bugs.python.org/issue21166
preparatory step to convert bsd.python.mk into a USES file.
- Use NLS_LIBS instead of NLS_LDFLAGS as done for lang/python27 (r357486)
- Use buildbottest in the regression-test: target
Phabric: D409
Reviewed by: koobs, sbz
With hat: python@