[Distutils] Disabling --single-version-externally-managed
Toshio Kuratomi
a.badger at gmail.com
Sat Sep 1 06:32:37 CEST 2007
[Resending with gzipped complete filelist as the previous try was too
large to send to the list]
Just to illustrate what I'm trying to achieve. I've updated the Fedora
Packaging Guidelines[1]_ to allow two versions of a package to coexist.
I'll list here the sqlalchemy-0.4 and -0.3 build steps, filelists, and
the output of the test-sql.sh script using this procedure. The end
result is what we want but the build step to get there seem a tad
fragile and kludgey. Since these are going to become guidelines for all
of our python packages, I'd like to know if either: 1) there's a better
way to do this or 2) the results I'm achieving are not expected and
could disappear with a random upgrade of setuptools.
.. _[1]: http://fedoraproject.org/wiki/PackagingDrafts/PythonEggs
Build
-----
sqlalchemy-0.3 compat package::
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py bdist_egg
mkdir -p %{python_sitelib}
easy_install -m --prefix $RPM_BUILD_ROOT%{_usr} dist/*.egg
sqlalchemy-0.4 default package::
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py bdist_egg
mkdir -p %{python_sitelib}
easy_install -m --prefix %{_usr} --always-unzip dist/*.egg
cd %{python_sitelib}/%{srcname}-%{version}%{betaver}-py%{pyver}.egg
mv sqlalchemy ..
ln -s ../sqlalchemy .
The compat package is pretty straighforward. However, building the
default package seems overly complex. It seems like we should be able
to do this::
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
But that yields the tracebacks when using pkg_resource.require() to try
to run 0.3.
truncated filelist
------------------
Full filelist attached. These are the main toplevel directories to show
where the important pieces are. The sqlalchemy directories all contain
a version of the python module. (SQLAlchemy-0.4.egg/sqlalchemy is
actually a symlink to site-packages/sqlalchemy but that doesn't matter.
Those can be reversed or they can be copies with the same results).
site-packages/SQLAlchemy-0.3.10-py2.5.egg
site-packages/SQLAlchemy-0.3.10-py2.5.egg/EGG-INFO
site-packages/SQLAlchemy-0.3.10-py2.5.egg/sqlalchemy
site-packages/SQLAlchemy-0.4.0beta4-py2.5.egg
site-packages/SQLAlchemy-0.4.0beta4-py2.5.egg/EGG-INFO
site-packages/SQLAlchemy-0.4.0beta4-py2.5.egg/sqlalchemy
site-packages/sqlalchemy
test-sql.sh output
------------------
import sqlalchemy... 0.4.0beta4
pkg_require >=0.3,<0.4.0beta1... 0.3.10
pkg_require... 0.4.0beta4
pkg_require >=0.3... 0.4.0beta4
pkg_require <= 0.4.10... 0.4.0beta4
pkg_require <=0.3.12... 0.3.10
-Toshio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sqlalchemy.lst.gz
Type: application/x-gzip
Size: 2755 bytes
Desc: not available
Url : http://mail.python.org/pipermail/distutils-sig/attachments/20070831/e568b0ec/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
Url : http://mail.python.org/pipermail/distutils-sig/attachments/20070831/e568b0ec/attachment.pgp
More information about the Distutils-SIG
mailing list