[issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures

2011-03-25 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

To complement Terry’s closing message: bdist_rpm is frozen in distutils, 
removed in distutils2/packaging, but has a new life at 
https://bitbucket.org/tarek/pypi2rpm/

--
nosy: +eric.araujo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5482
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures

2010-06-26 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

see msg108752

--
nosy: +tjreedy
resolution:  - wont fix
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5482
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures

2009-04-07 Thread Rudd-O

Rudd-O rud...@rudd-o.com added the comment:

I saw your talk.  Excellent.  Let's make sysadmins and release managers
happy while keeping the excellent buildout infrastructure for
developers.  I KNOW we can do it, and I'm going to help you get there. 
 And maybe next year we both can do a talk about it all.  And kick
everybody's ass.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5482
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures

2009-04-05 Thread Tarek Ziadé

Tarek Ziadé ziade.ta...@gmail.com added the comment:

Rudd-O, I am trying to see if we can build a team of people that could
work on python - RPM tasks to adress all related issues. I'll let you
know when it's set.

--
priority:  - high

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5482
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures

2009-04-05 Thread Rudd-O

Rudd-O rud...@rudd-o.com added the comment:

Excellent.

El Domingo 05 Abril 2009, 
=?utf-8?q?tarek_ziad=c3=a9_=3creport=40bugs=2epython=2eorg=3...@psf.upfronthosting.co.za
 
escribió:
 Tarek Ziadé ziade.ta...@gmail.com added the comment:

 Rudd-O, I am trying to see if we can build a team of people that could
 work on python - RPM tasks to adress all related issues. I'll let you
 know when it's set.

 --
 priority:  - high

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue5482
 ___

-- 

Manuel Amador (Rudd-O) rud...@rudd-o.com
Rudd-O.com - http://rudd-o.com/
GPG key ID 0xC8D28B92 at http://wwwkeys.pgp.net/

Now playing, courtesy of Amarok: UB40 - I would do for you
We are not loved by our friends for what we are; rather, we are loved in
spite of what we are.
-- Victor Hugo

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5482
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures

2009-03-30 Thread David Fraser

Changes by David Fraser dav...@sjsoft.com:


--
nosy: +davidfraser

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5482
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures

2009-03-19 Thread Tarek Ziadé

Tarek Ziadé ziade.ta...@gmail.com added the comment:

Hi Rudd-O. Sorry i didn't look at your patches and idea yet, I am
preparing Pycon.

Make sur you write your patches against Python truk, not Python 2.4.
For example the current has already -O enabled for build_rpm

--
versions: +Python 2.7, Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5482
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures

2009-03-19 Thread Rudd-O

Rudd-O rud...@rudd-o.com added the comment:

patch does what others did, plus this time it lets the specfile
autodiscover the python abi so the name is correct regardless of against
whichever python interpreter the package is built.

--
Added file: 
http://bugs.python.org/file13381/python-2.4-distutils-bdist_rpm-autonames+optimize-v3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5482
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures

2009-03-19 Thread Rudd-O

Rudd-O rud...@rudd-o.com added the comment:

about python trunk...

gimme some time to port them incrementally to all popular stable pythons
first, then to trunk.  will be glad to do this.

Now, by trunk, do you mean python 3.x?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5482
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures

2009-03-18 Thread Rudd-O

Rudd-O rud...@rudd-o.com added the comment:

ahaha! I have the patch that implements this functionality.

1) it renames the RPM package name to python-%packagename-py2.4 and and
its requirements as well.
2) it autooptimizes (-O1) any RPM built if no optimization has been
configured in setup.cfg, so it works with any SELinux-enabled or any
other MAC-enabled platforms.

patch against distutils of python 2.4.  works with latest setuptools
just fine.

--
keywords: +patch
Added file: 
http://bugs.python.org/file13367/python-2.4-distutils-bdist_rpm-autonames+optimize.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5482
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures

2009-03-18 Thread Rudd-O

Rudd-O rud...@rudd-o.com added the comment:

Improved version of the autonaming patch, now makes rpmbuild accept
files that were installed with spaces on their names.

--
Added file: 
http://bugs.python.org/file13372/python-2.4-distutils-bdist_rpm-autonames+optimize-v2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5482
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures

2009-03-14 Thread Rudd-O

Rudd-O rud...@rudd-o.com added the comment:

More info:

From my wicked noarch RPM compiled in an i386 machine, installed into my
64 bit centos (same OS):

[rud...@tobey ~]$ python
Python 2.4.5 (#1, Mar 13 2009, 12:13:36)
[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
Type help, copyright, credits or license for more information.
 import wicked
 wicked.__file__
'/usr/lib/site-python/wicked/__init__.pyc'

Evidence that the compiled file is being not recompiled, and is being
used directly on import, even across architectures.

-

However, I have discovered that I cannot run the same pyc file across
interpreters, even though the py file would run, so I am stumped at
this.  The reason i am stumped is that I can find a
platform-independent, interpreter-independent dir (site-python), and a
platform-dependent, interpreter-dependent dir (site-packages), but NOT a
platform-independent, interpreter-dependent dir, which is the BIG issue
here if we want to at least avoid having to rebuild python packages for
different architectures with the SAME interpreter.

Ideas?  I am thirsty for more knowledge here and losing hope.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5482
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures

2009-03-14 Thread Rudd-O

Rudd-O rud...@rudd-o.com added the comment:

apparently, /usr/lib/python2.4/site-packages IS in the sys.path, which
would seem to indicate that python would actually load pure python
modules from there.

Which means that the only fixes that need to go within distutils would be:

1. a fix so in 64bit arches, pure python modules are STILL INSTALLED
within the /usr/lib/python2.X dir instead of lib64
2. making every RPM built out of a pure python module depend on the
specific Python interpreter it was built under, to a precision of
major.minor version.

Right?

This sort of busts my plan of providing universal RPM packages for all
distributions, BUT... BUT... at least means that a single package can
work in all platforms of all distributions that have a particular
version of the interpreter it was built in.  Which is a space / busywork
savings of at least platforms*distributions.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5482
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures

2009-03-14 Thread Rudd-O

Rudd-O rud...@rudd-o.com added the comment:

last comment, first line, I should amend it to say that even in 64bit
arches, the /usr/lib (NOT ilb64) sitepackages dir is available.

I would have to actually try this on the packages that I have, see how i
fare.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5482
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures

2009-03-14 Thread Rudd-O

Rudd-O rud...@rudd-o.com added the comment:

FYI: In RPM, the correct dependency to require a particulr python minor
version is:

python(abi) = 2.X

where X is the minor version.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5482
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures

2009-03-14 Thread Rudd-O

Rudd-O rud...@rudd-o.com added the comment:

Apropos this bug, the issues are fleshed out here:

http://rudd-o.com/new-projects/python-improvements/how-to-slash-man-years-from-the-process-of-building-rpms-out-of-python-modules

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5482
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures

2009-03-13 Thread Rudd-O

New submission from Rudd-O rud...@rudd-o.com:

Hello, guys.  I am looking for feedback on the topic which I am going to
lay out.  First, sys.path:

---
# python2.4
 import sys
 sys.path
['', '/home/rudd-o', '/usr/lib64/python24.zip', '/usr/lib64/python2.4',
'/usr/lib64/python2.4/plat-linux2', '/usr/lib64/python2.4/lib-tk',
'/usr/lib64/python2.4/lib-dynload',
'/usr/lib64/python2.4/site-packages',
'/usr/lib64/python2.4/site-packages/Numeric',
'/usr/lib64/python2.4/site-packages/PIL',
'/usr/lib64/python2.4/site-packages/gtk-2.0',
'/usr/lib/python2.4/site-packages', '/usr/lib64/site-python',
'/usr/lib/site-python']
--

Now: Currently, bdist_rpm target builds RPMs that install to
/usr/lib(64)/python2.X/site-packages/.  This is wasteful and inefficient
in the case of pure python modules for the following reasons:

1. It necessitates a rebuild of the python modules for at least 2
architectures -- 64-bit and 32-bit, since they go to different
directories.  Worst part is, the packages themselves are
indistinguishable by name (they are built as Noarch in all
architectures) so a package built in 64bit cannot function in 32bit BUT
it is *installable* by RPM.
2. It necessitates a rebuild for every python minor version out there,
2.4, 2.5, 2.6.  This is also problematic because packages need to be
rebuilt for every distribution release out there, instead of being able
to build a single RPM that works across distro releases (or, the holy
grail, across distros altogether).

Now, I have familiarized myself with distutils enough that I can make a
quick patch that

- detects if the package is a pure python module
- ensures that the install-purelib directive in the [install] section of
setup.cfg is absent

and if both conditions are present, then the package is automatically
installed into /usr/lib/site-python.

The benefits are clear:

- only a single RPM needs to be built across distro versions and
architectures
- it enables cheese shop packages to be quickly built on a machine and
then installed in another
- it eliminates the need for the tedious process of writing custom spec
files
- packages built this way can be loaded and run by virtually all 2.x
python interpreters out there right now
- it would be possible to even build python RPMs that work across
distributions

This patch is no more than a two-liner, and I am looking for input, to
see if someone agrees, or not, to flesh out any pitfalls before going
in.  So do your best and provide sensible reasons why I should not do
this, or else I will do it and submit a patch.

Clock's ticking.

--
assignee: tarek
components: Distutils
messages: 83513
nosy: Rudd-O, tarek
severity: normal
status: open
title: RFC: improve distutils bdist_rpm so it builds pure python modules as 
single packages that works across architectures
type: feature request

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5482
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com