1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-04 01:48:54 +00:00
Commit Graph

190 Commits

Author SHA1 Message Date
Marcus von Appen
f002f3a384 - Remove lang/python as implicit build and run dependency from
bsd.python.mk

  Ports need to use a designated python interpreter, whether this
  is the default one chosen by the user (or provided by the system)
  and pulled in via USE_PYTHON[_BUILD|_RUN]=yes or an explicit version
  or version range pulled in via USE_PYTHON[_BUILD|_RUN]=X.Y does not
  matter.

  Ports should however not rely on 'python' at build or installation
  time, whenever possible to avoid problems with building packages for
  different python versions.

  This change tries to raise the barrier for misbehaving ports and eases
  package builds for different python versions.

Tested with:	exp-run (ports/184591)
Reviewed by:	wg@, koobs@
Supported by:	wg@
With hat on:	python@
2013-12-18 17:21:49 +00:00
William Grzybowski
2fc30ab028 Mk/bsd.python.mk: fix setup call for python 3.x
Reported by:	antoine
2013-12-16 22:01:40 +00:00
William Grzybowski
1e34739b64 Use setuptools for all Python ports.
Setuptools is the preferred method to manage Python distributions after
many changes to the packaging ecosystem over the past couple of years.

Only ports using USE_PYDISTUTILS= yes are affected by this commit, ports using
USE_PYDISTUTILS= easy_install remains the same however this usage is now
deprecated and should be converted to USE_PYDISTUTILS= yes.

Some Python distributions do not work with setuptools out of the box because
they extend the install command from distutils and not setuptools, and
so they need to be patched accordingly.

pip (which leverages setuptools) works around the issue by using eggs, however
we want to get rid of those as well, as support for "flat" installation is
unavailable or has other issues associated with it.

This work allows us to unify how python packages are built, ensure that Python
distributions are installed consistently, reduces complexity for Python port
maintainers and paves the way for simplifying the Python ports framework in
the future.

With hat on:	python
Reviewed by:	koobs, antoine
Exp-run:	bdrewery
Approved by:	bdrewery (portmgr)
2013-12-15 16:22:17 +00:00
Marcus von Appen
885b528f02 New USES=twisted, to replace the old USE_TWISTED knob.
twisted can be configured with the arguments run or build to replace
the previous USE_TWISTED_RUN and USE_TWISTED_BUILD knobs. The twisted
components can be added as comma-separated arguments. If you previously
wrote
    USE_TWISTED=        yes
    USE_TWISTED=        conch names
    USE_TWISTED_RUN=    yes
you now would write
    USES=       twisted
    USES=       twisted:conch,names
    USES=       twisted:run
2013-12-08 12:04:07 +00:00
William Grzybowski
99c5ad4239 devel/py-setuptools: Python packages installer
The fork Distribute was merged back into setuptools.
http://pythonhosted.org/setuptools/merge.html

PR:		ports/183726
Exp-run by:	bdrewery
2013-11-27 18:48:48 +00:00
Kubilay Kocak
9c597eecc6 lang/python27: Update to 2.7.6
- Update to 2.7.6
- Update pkg-plist
- Temporarily override OPT:Olimit using CONFIGURE_ENV (ports/182952) [1]
- Replace patch: extra-patch-configure-pth with CONFIGURE_ENV instead
- Remove patch: patch-Modules-_ctypes-libffi_fficonfig.py.in [2]
- QA: Clean up and group related USE_*, WRKSRC and CONFIGURE entries
- QA: Whitespace alignment

Changes: 2.7.6 - November 10, 2013

http://www.python.org/download/releases/2.7.6/

[1] Python removed OPT:Olimit in 3.2+, requested backport or
    alternative upstream patch: http://bugs.python.org/issue877121
[2] Upstreamed: http://bugs.python.org/issue18178

PR:		ports/182952
PR:		ports/156759
Reviewed by:	antoine, mva
2013-11-24 13:22:40 +00:00
Dmitry Sivachenko
82247f1486 Update to version 3.3.3. 2013-11-19 14:52:23 +00:00
William Grzybowski
6e2087197c Mk/bsd.python.mk: remove deprecated easy install vars
Those vars have been deprecated for a long time, this is a no op.
2013-11-09 13:20:05 +00:00
William Grzybowski
b8481a8c7d Mk/bsd.python.mk: add staging support for easy_install
This allows stage dir support for python packages using easy_install
method from setuptools module.

easy_install target does not support a --root so we workaround it with
PYTHONUSERBASE and other user flags.

Submitted by:	nivit, wg
With hat on:	python
Exp-run:	bdrewery
2013-11-09 13:09:49 +00:00
Kubilay Kocak
ce4af1f963 Fix a typo: USE_PYDISUTILS -> USE_PYDISTUTILS 2013-11-09 08:08:35 +00:00
Kubilay Kocak
5677f2500d Further clarify PYTHON_PY3K_PLIST_HACK and PYTHON_PY3K_PLIST_HACK usage 2013-11-09 07:25:29 +00:00
Marcus von Appen
c393e4469b - Followup commit for the final lang/python26 update, that was missed
previously
2013-11-02 12:39:32 +00:00
Kubilay Kocak
d955a5a81d Mk/bsd.python.mk: Further tweaks to clarify AUTOPLIST and PY3K_HACK
Reviewed by:	mva
2013-10-27 09:30:09 +00:00
Kubilay Kocak
269f9dbb91 Mk/bsd.python.mk: Clarify PYTHON_PY3K_PLIST_HACK & PYDISTUTILS_AUTOPLIST usage
Reviewed by:	mva, Johannes Meixner (xmj) via IRC
2013-10-26 10:11:45 +00:00
Marcus von Appen
026a6cfc87 - Fix replacement expressions for manpages, if PYDISTUTILS_AUTOPLIST is set 2013-10-19 07:49:54 +00:00
Marcus von Appen
ae868cb7fb - Enable proper manpage handling for PYDISTUTILS_AUTOPLIST, if the
manpages are installed by distutils.

Requested by:	avg@
Improvements:	jhein@symmetricom.com
2013-10-18 16:28:48 +00:00
Marcus von Appen
f106670c04 The default versions of lang/python* have been changed to support the
new DEFAULT_VERSIONS variable.

PYTHON_DEFAULT_VERSION, PYTHON2_DEFAULT_VERSION and
PYTHON3_DEFAULT_VERSION are deprecated. If you have set them in your
make.conf, you should change them something like

DEFAULT_VERSIONS=python=2.7 python2=2.7 python3=3.3
2013-10-03 09:25:37 +00:00
Marcus von Appen
e313d07ec3 Enable python meta-ports to be used as direct dependencies
via USE_PYTHON=2 (for lang/python2) or USE_PYTHON=3 (for lang/python3).
This can be used for ports, which do not care, which specific minor
release version of Python 2.x or Python 3.x is used, as long as there
are proper symlinks to e.g. bin/python2 or bin/python3.
2013-09-30 17:56:28 +00:00
Marcus von Appen
7fa21a62f0 - Delete the whole directory hierarchy, not only directories containing
files, when using PYDISTUTILS_AUTOPLIST.

Spotted by:	wg@
2013-09-27 18:33:16 +00:00
Marcus von Appen
330a9beb82 - Introduce a new port Makefile knob PYDISTUTILS_AUTOPLIST.
This will cause the ports framework to create the plist automatically
  for distutils-based ports. All files installed via Python's distutils
  mechanisms (either the traditional distutils or easy_install) will be
  automtically added to the package list, regardless of the Python
  version. It is somewhat similar to the RUBYGEM_AUTOPLIST knob.

- Introduce a new port Makefile knob PYTHON_PY3K_PLIST_HACK.

  This automatically replaces .pyc and .pyo package list entries with
  the relevant __pycache__ entries for Python 3.x. It should only be
  used for ports, which do not use one of Python's default package
  installation mechanisms and which are guaranteed to work with any
  python version.
2013-09-26 18:27:02 +00:00
Ruslan Makhmatkhanov
dc659a215b - add new USES target: zope, and convert the tree to it
- old USE_ZOPE knob support was removed from bsd.python.mk
- update CHANGES and bsd.sanity.mk accordingly
- add ZOPE options knob and use it in lang/py-mx-base

The work is done by Marcus von Appen, but any problems are mine.

Submitted by:	mva (python ML)
2013-09-23 13:42:48 +00:00
Baptiste Daroussin
cf099c77fa Add support for staging area in the ports tree
The ports tree is now staged by default. With pkgng the sequence hasn't
changed, the main difference is that creating package is now independent
from installing it. With pkg_install, the package is now created first
and make install, do install the package.

New macros:
- STAGEDIR: PATH to the directory where the port will be staged.
- NO_STAGE: Keep the old behaviour of the ports tree (aka no staging area)

Unsupported macro if NO_STAGE is not set:
- MAN* with staging man page compression and handling of hardlinks and
symlinks is automatically done in the stage. the manpages becomes then a
"normal" plist files and should be tracked in pkg-plist.
- MANCOMPRESSED the compress-man target is able to only compress when it
needed.

New target:
- stage: this installs everything into the stage directory
- makeplist: this will create a pkg-plist and print it to stdout. This is
a sample plist and it should always be _reviewed_ not directly used.

NOTE: with staging only what is in the plist will be installed, nothing more,
meaning a port staged cannot have leftovers exect directories left. It is
really important to double check the pkg-plist to make sure all the files
the maintainer want to package are in! make makeplist can help in that area.

The goal is to handle as quickly as possible a full removal of the NO_STAGE
support.

More features can be added once the full ports tree is converted to using the
staging area

Conversion notes:
- Remove NO_STAGE
- in {pre,do,post}-install
  * Before any usage of ${PREFIX}, ${ETCDIR}, ${PORTSDIR}, ${PORTEXAMPLES}
    prepend ${STAGEDIR}
  * Remove any thing that is done by @exec or +INSTALL script it will be
    done automatically when syncing packages
  * Remove any code to show PKG-MESSAGE it will be done automatically when
    syncing packages
  * Directory creation should remain in post-install (in particular because
    pkgng doesn't work like pkg_install in that area and pkgng ignores the
    @exec mkdir but directly pack the directory even if empty)
- PORTDOCS/PORTEXAMPELS
  To support PORTDOCS, PORTEXAMPLES most of the time there is no more need
  for hacks. just add the right %%PORTDOCS%% or %%PORTEXAMPLES%% in your
  plist then the given files from the stagedir will or will not sync
  according to NOPORTDOCS and NOPORTEXAMPLES.

With hat:	portmgr
Reviewed by:	bdrewery
2013-09-23 05:56:35 +00:00
Marcus von Appen
1e35ab7368 - Introduce PYTHON2_DEFAULT_VERSION, the version of the default python2
binary in $PATH. It can be set in case the user wants to use a
  specific python2 version as a default. Its behaviour is similar
  to the existing PYTHON3_DEFAULT_VERSION and fixes a small issue with
  package builds for different python versions.
- Outline that PYTHON_DEFAULT_VERSION always takes precedence for a
  specific python major version.
- Update lang/python2 to use PYTHON2_DEFAULT_VERSION and bump the
  PORTREVISION to let the installed port catch up with the change.
- Allow PYTHON3_DEFAULT_VERSION to overriden by a user choice, if
  PYTHON_DEFAULT_VERSION is not set to a python3 port.

Reported by:	David Demelier <demelier.david@gmail.com>
Reviewed by:	koobs@, sbz@
With hat on:	python@
2013-09-15 12:52:28 +00:00
Sunpoet Po-Chuan Hsieh
90f9630c5f - Update comment of PYTHON_DISTFILE 2013-09-07 17:21:58 +00:00
Marcus von Appen
c46a353b83 - document the PYTHON_VER variable for port Makefiles 2013-08-25 08:12:59 +00:00
Marcus von Appen
0d2b99cdf6 - Add lang/python as temporary RUN and BUILD dependency, if USE_PYTHON*
is set. This should avoid most of the problems, the lang/python change
  introduced.
2013-08-18 14:46:41 +00:00
Chris Rees
3d119ba514 When python ports are installed that depend on the architecture/ABI of the
system currently installed (i.e. PYEASYINSTALL_ARCHDEP) the entire version
string of the system is used in the destination directory, for example;

python_ldap-2.4.12-py2.7-freebsd-10.0-CURRENT-amd64.egg

This plays havoc when STABLE, RELEASE and RELENG are used, not forgetting
patchlevels as well.  Now, only the major FreeBSD version number is included;

python_ldap-2.4.12-py2.7-freebsd-10-amd64.egg

Given that ABI should be stable at least over major releases, this now allows
packages to be created and installed correctly.

PR:		ports/133081
Submitted by:	Stef Walter <stef@memberwebs.com>
		(this patch used as a starting point)
Reviewed by:	No objections from python@
2013-06-29 11:43:01 +00:00
Martin Wilke
14422a1b1e - Remove support for USE_CMAKE and KDE4_BUILDENV, they are no of use anymore.
Unconditionally set CMAKE_ARGS in bsd.python.mk, as it don't affect non-cmake ports

PR:		177356
Submitted by:	makc@
2013-05-31 16:03:49 +00:00
Ruslan Makhmatkhanov
96f67b5600 Update lang/python32 to 3.2.5 and lang/python33 to 3.3.2 2013-05-18 08:21:00 +00:00
Ruslan Makhmatkhanov
11bf569497 - update to latest upstream versions:
. lang/python27: 2.7.3 -> 2.7.5
  . lang/python32: 3.2.3 -> 3.2.4
  . lang/python33: 3.3.0 -> 3.3.1
- update Mk/bsd.python.mk with new versions
- mark lang/python26 and lang/python31 as deprecated (set them to
  upstream EoL dates)
- update docs (lang/python-doc-html)
- align databases/py-bsddb patch for python27 - most of it was applied
  upstream. Raise BDB version to 4.3 atleast, according to
  upstream requirements.

Many thanks to Martin (miwi) for his time on this update.

PR:		178506
Submitted by:	rm (myself)
Exp-run by:	    portmgr (miwi)

- revert erroneous threads patch in lang/python26 and lang/python27,
  that was added after ports/131080. It was rejected upstream, because it's
  not actually a bug, but misuse.

  Gabor Pali (pgj) in collaboration with Kubilay Kocak (koobs) did an
  independent investigation regard the issue. See here for details:

  http://lists.freebsd.org/pipermail/freebsd-python/2013-April/005376.html

PR:	    153167
Submitted by:	Duncan Findlay <duncan@duncf.ca>
Reported by:	pgj/koobs (at python@ ML)
Exp-run by:     portmgr (miwi)
2013-05-17 04:17:22 +00:00
Ruslan Makhmatkhanov
f831a5f25d Commit all the non-functional changes to python ports to reduce the diff size
for an exp-run of updated python versions.

- trim Makefile headers
- remove leading indefinite article from COMMENT
- use PYTHON shortcut in MASTER_SITES
- whitespace fixes
- remove checks for unsupported versions of FreeBSD
- use static value ``33'' instead of PYTHON_SUFFIX in lang/python33/pkg-plist,
  because this value is not supposed to be changed across the branch and for
  consistency with other python3 ports
- remove conflicts in lang/python-mode.el with not more existing python-2.4
2013-05-11 11:37:54 +00:00
Baptiste Daroussin
e727f72ce8 Only try to retrieve python's version is the python command is installed to please bmake
Obtained from: 	dports
2013-05-02 14:11:03 +00:00
Sunpoet Po-Chuan Hsieh
6cfb605b6b - Update USE_PYTHON example
- Add cosmetic tab
2013-03-09 15:58:45 +00:00
Ruslan Makhmatkhanov
b06fadc69e - replace deprecated devel/py-setuptools with devel/py-distribute
- change explicit dependency for the ports, that don't utilize USE_DISTUTILS feature
- add UPDATING entry

PR:		176142
Submitted by:	rm (myself)
Approved by:	portmgr (miwi)
Tested by:  	exp-run by miwi
2013-03-05 07:12:24 +00:00
Li-Wen Hsu
6e2fa0573b - Remove "first-installed-win" logic for automatically setting
${PYTHON_DEFAULT_VERSION}, this generates conflicting packages.

- Create symbolic links as PEP 394 [1] suggests. ${PYTHON_DEFAULT_VERSION}
  will create python and python${MAJOR_VERSION} links.  In current default,
  lang/python27 will create: python -> python2 -> python2.7

- Introduce ${PYTHON3_DEFAULT_VERSION}, which will handle bin/python3 link.
  At this point, lang/python33 will create python3 -> python3.3

- Minor cleanups
  * Trim Makefile headers
  * Remove ${OSVERSION} detection for xz, whihc is done by USE_XZ

[1] http://www.python.org/dev/peps/pep-0394/
2012-12-23 17:52:46 +00:00
Dmitry Sivachenko
7c0f9fe801 Introduce PYTHON_MAJOR_VER variable.
Discussed on python@ a while ago.
2012-12-21 15:38:06 +00:00
Dmitry Sivachenko
c3793c1fde Port for python version 3.3.
Submitted by:	Kubilay Kocak <koobs.freebsd@gmail.com>
2012-12-20 11:55:54 +00:00
Ruslan Makhmatkhanov
309da33d2f - do not hardcode distfile extension for lang/python ports in bsd.python.mk
(PYTHON_DISTFILE variable)
- switch lang/python ports (and it's slaves) to tar.xz

I compared all the four pairs .tgz/.tar.xz and they have no content differences.

Discussed on:	python@
2012-10-03 04:06:37 +00:00
Ruslan Makhmatkhanov
a42c55a4cd - remove PYDISTUTILS "dependency line" since USE_PYTHON will garantee
availability of distutils module. There is no consumers of this in the tree.
- add PYGAME shortcut for devel/py-game
2012-09-13 04:05:41 +00:00
Ruslan Makhmatkhanov
8a2c694e65 - trim check for unsupported python versions
- change depends for USE_ZOPE case to make it work with current zope version

Submitted by:	lwhsu (final patch revision)
Reviewed by:	crees
Discussed in:	python
2012-09-11 14:27:22 +00:00
Ruslan Makhmatkhanov
473f7fc2dc - remove expired ports
* lang/python24 and lang/python25: unmaintained upstream
  * www/zope and www/zope211: unmaintained upstream (the only
    consumers of python24)
- clean-up python versions < 2.6 from lang/python-doc-html
- clean-up python24/25 from Mk/bsd.ports.mk
- add www/zope213 glue to bsd.python.mk
- clean-up zope versions != 2.13 from bsd.python.mk

Submitted by:	miwi (based on)
Approved by:	portmgr (miwi)
2012-07-16 17:04:29 +00:00
Sunpoet Po-Chuan Hsieh
83b5f64d38 - Revert accidental commit 2012-06-26 13:54:59 +00:00
Sunpoet Po-Chuan Hsieh
8ae901c16d - Add shared TLS description 2012-06-26 13:42:52 +00:00
Marcus von Appen
abb9ab5e87 - Force cmake to use PYTHON_VER as version to detect, so that it uses
the same Python version for the interpreter and library linking, if
  multiple Python versions are installed.

PR:		ports/168159
On behalf of:	python@
2012-06-19 17:18:13 +00:00
Marcus von Appen
ceb60c1ed0 - Ensure that PYTHONOPTIMIZE and PYTHONDONTWRITEBYTECODE are ignored on
using PY_DISTUTILS to avoid plist corruptions

PR:		ports/146957
Reported by:	swell.k@gmail.com
On behalf of:	python@
2012-06-17 12:28:19 +00:00
Sunpoet Po-Chuan Hsieh
7ef8361ca5 - Fix format:
- Remove superfluous colon
  - Change tab to space in the message
2012-05-30 14:54:34 +00:00
Ruslan Makhmatkhanov
9c08ea7fd8 Fix incompatibilities with python 3.x (mostly calling print as function).
PR:		166226
Submitted by:	Mel Flynn <rflynn at acsalaska dot net>
Approved by:    portmgr (pav)
2012-05-25 17:13:10 +00:00
Martin Wilke
61d8acdb49 - Remove emacs mode, -*- mode: ...; -*- [1]
- Comments for BUILD_ and RUN_DEPENDS fail to mention alternate means to specify dependencie [2]
- Fix make reinstall [3]
- Trivial comment change for PORTDATA [4]

PR:		151954 [1]
		161314 [2]
		167085 [3]
		167465 [4]
Submitted by:	Anonymous <swell.k@gmail.com> [1]
		dougb@ and Chris Rees <utisoft@gmail.com> [2]
		Garrett Cooper <yanegomi@gmail.com> [3]
		"Bryan Drewery" <bryan@shatow.net> [4]
Tested via:	phw
2012-05-23 08:17:49 +00:00
Martin Wilke
19425757a8 - Update:
* python26 -> 2.6.8
  * python27 -> 2.7.3
  * python31 -> 3.1.5
  * python32 -> 3.2.1

Security:	http://www.vuxml.org/freebsd/b4f8be9e-56b2-11e1-9fb7-003067b2972c.html
		CVE-2012-0845 CVE-2012-0876 CVE-2012-1150 CVE-2012-0845 CVE-2011-3389
2012-04-11 12:52:17 +00:00
Pav Lucistnik
0e654d3512 - Stop resolving dependencies on deinstall when juggling python eggs
PR:		ports/159962
Submitted by:	Ruslan Mahmatkhanov <cvs-src@yandex.ru>
2011-11-07 12:40:53 +00:00