tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

BAD Python compilation directives

I am a Python Core developer and the owner of the bsddb3 Berkeley DB
bindings for Python. The original code, not the pkgsrc integration.

I just migrated to SmartOS and I noticed that current bsddb3 bindings
can not find the Berkeley DB libraries in the system.

I have updates my module to expand the search and now it compiles
cleanly on SmartOS native zones and, I hope (somebody could try?) on
other pkgsrc supported systems.

In the process, nevertheless, I have found an issue with the flags used
to compile both Python 2 and Python 3.

Long story short:

- You are using "-I/opt/local/include/db4" with Python 3. That is
completely unnecessary, because Python 3 doesn't include a bsddb module.
It was dropped in the 2->3 transition. My guess is that that flag was
just kept when Python 3 was integrated, using python 3 integration as a
template. It should be simply dropped, it has no effect in python but it
has a (negative) effect when compiling external modules, in this case
the bsddb3 bindings.

- Python 2 also has "-I/opt/local/include/db4" in order to compile the
builtin bsddb bindings. Nevertheless, that is wrong. The search details
should be patched in the bsddb source code, not in thru python
compilation flags. If you do that, it will interfere with other external
modules like... my bsddb3 bindings.

Since I am a python core developer, I plan to include support for pkgsrc
in the included bsddb code for future Python 2.7.14, so these kludges
can be dropped.

My questions then are:

1. I usually work against Joyent pkgsrc repository. Supposedly they
would move those patches upstream. Given the nature of the issues and
the unknown (so far, I just starting this journey) diligence of Joyent,
maybe should I try a up to down strategy?.

2. What versions of pkgsrc should I target?. "current" (future 2017Q1)
only?. Joyent supports 201XQ4 for three years, if I recall correctly.

3. If you decide that I should do this work on original pkgsrc instead
of Joyent one, how must I proceed?. Are pkgsrc developer guide details

4. When Python 2.7.14 is out, what would be the procedure to clean the
"unneeded" patches in pkgsrc?.

Is this the right mailing list to discuss those issues?.

Any advice welcomed. Thanks.

Jesús Cea Avión                         _/_/      _/_/_/        _/_/_/ -     _/_/    _/_/  _/_/    _/_/  _/_/
Twitter: @jcea                        _/_/    _/_/          _/_/_/_/_/
jabber /  _/_/  _/_/    _/_/          _/_/  _/_/
"Things are not so easy"      _/_/  _/_/    _/_/  _/_/    _/_/  _/_/
"My name is Dump, Core Dump"   _/_/_/        _/_/_/      _/_/  _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz

Attachment: signature.asc
Description: OpenPGP digital signature

Home | Main Index | Thread Index | Old Index