Page MenuHomeFreeBSD

Add python 3 version of boost-python-libs
ClosedPublic

Authored by kwm on Jun 1 2017, 10:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 6, 9:02 AM
Unknown Object (File)
May 24 2024, 11:51 AM
Unknown Object (File)
May 24 2024, 11:51 AM
Unknown Object (File)
May 24 2024, 11:51 AM
Unknown Object (File)
May 24 2024, 11:51 AM
Unknown Object (File)
May 24 2024, 11:51 AM
Unknown Object (File)
May 22 2024, 10:32 AM
Unknown Object (File)
Apr 19 2024, 11:45 AM
Subscribers

Details

Summary

Copy boost-python-libs to boost-python3-libs and restrict both to
either python -2.7 or 3. The library is named differently which I reflected to
the new port name, so both can be installed at the same time.

Also drop mention of devel/boost-pyste which was removed ages ago.

Test Plan

The only users I know that uses boost-python3 is upstream glom. It passes
configure stage, I can't run test it yet due to build issues I still need
to resolve.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kwm added a subscriber: office.

Add office as reviewers, maybe it me but phabricator is confusing at times...

Could you make devel/boost-python3-libs a slave port of devel/boost-python-libs?

I guess a simple devel/boost-python3-libs/Makefile should be sufficient.
Both ports can share the existing pkg-descr and pkg-plist.

For the pkg-descr, I would simply add 2 lines indicating that devel/boost-python-libs is for Python 2 and devel/boost-python3-libs is for Python 3.

Regarding the pkg-plist, you could prepend %%PYTHON2%% and %%PYTHON3%% as follows: (see Mk/Uses/python.mk line 202-205)
%%PYTHON2%%lib/libboost_python.a
%%PYTHON2%%lib/libboost_python.so
%%PYTHON2%%lib/libboost_python.so.%%BOOST_SHARED_LIB_VER%%
%%PYTHON3%%lib/libboost_python3.a
%%PYTHON3%%lib/libboost_python3.so
%%PYTHON3%%lib/libboost_python3.so.%%BOOST_SHARED_LIB_VER%%

devel/boost-python-libs/Makefile
7 ↗(On Diff #29124)

Since we do not have any other 2.x versions, it's fine to use "python:2.7".

devel/boost-python3-libs/Makefile
7 ↗(On Diff #29124)

Please use something like "python:3.3+" to avoid unnecessary dependency on lang/python3.

I had to look twice before I noticed the PYTHON2="@comment " part in make -V PLIST_SUB of boost-python3-libs, probably because I didn't expect it to be there even after you told me. Update with your suggestions soon.

devel/boost-python-libs/Makefile
7 ↗(On Diff #29124)

Makes sense, I just blindly copied it what miwi@ said, without thinking about it.

devel/boost-python3-libs/Makefile
7 ↗(On Diff #29124)

Yeah I only got told to do this a few days ago, until then I was in the assumption python:3 was good. This probably need to be announce by the python team?

Make boost-python3-libs a slave of boost-python-libs.

I put the COMMENT in boost-python3-libs because it looks ugly inside the
.if block

devel/boost-python-libs/Makefile
7 ↗(On Diff #29124)

Could you put USES?=python:2.7 in boost-python-libs and USES=python:3.3+ in boost-python3-libs? It looks simpler and other ports do so.

Can't do that since that nukes other USES.

kwm@crashalot:~/sources/freebsd/ports/devel/boost-python-libs % make -V USES
python tar:bzip2 compiler:features

Why? Other USES are added later.

% cd boost-python-libs/
% make -V USES
python:2.7 tar:bzip2 compiler:features
% grep -n USES Makefile
7:USES?= python:2.7
% grep -n include Makefile
11:.include "${.CURDIR}/../boost-all/common.mk"
13:.include "${.CURDIR}/../boost-all/compiled.mk"
48:.include <bsd.port.mk>
% grep USES ../boost-all/*
../boost-all/common.mk:USES+= tar:bzip2
../boost-all/compiled.mk:USES+= compiler:features
../boost-all/Makefile:USES= metaport

% cd ../boost-python3-libs/
% make -V USES
python:3.3+ tar:bzip2 compiler:features
% grep -n USES Makefile
6:USES= python:3.3+

Move USES=python to the actual port.

Was confused about include/replace order, due to slave port includes.

This revision is now accepted and ready to land.Jun 7 2017, 4:14 PM
This revision was automatically updated to reflect the committed changes.