Re: Python, distutils, rpmbuild, issues

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

 



Toshio Kuratomi wrote:
Gerry Reno wrote:
  
Jesse Keating wrote:
    
No, this won't work.  5.0.0_rc2 is in fact rpm newer than 5.0.0.
  
      
Is there some way to force rpm to recognize 5.0.0 as newer than
5.0.0_rc2?  How else are you supposed to handle the release candidate
packaging?

    
No.  This needs to be fixed in distutils/setuptools.  I don't think that
distutils currently knows anything about versions and ordering.
setuptools does its own ordering which is incompatible with rpm but I
don't believe that impacts the bdist_rpm target.

To work, bdist_rpm would need to understand the ordering of the package
and map that to an ordering for rpm.  In Fedora we do the mapping
manually by placing the prerelease information into the rpm release field:

Upstream: foo-5.0.0_rc2
Rpm Version: 5.0.0
Rpm Release: 0.1.rc2

Upstream: foo-5.0.0_rc3
Rpm Version: 5.0.0
Rpm Release: 0.2.rc3

Upstream: foo-5.0.0
Rpm Version: 5.0.0
Rpm Release: 1
  
Ok, I need to work on this a little to see what is going to be necessary to get something that will work for both apt and rpm as far as release candidate versioning, ordering and updating.

  
As to your other problem, I haven't even attempted it as the distutils
generated spec file isn't acceptable to Fedora packaging standards,
  
      
Why is this?  I've built RPMS using bdist_rpm and they work just fine. 
You can configure things in setup.cfg.  Of course I had to force an
ignore of the "Installed but not packaged files" error which is not a
permanent solution to the problem.  I would prefer to use 'bdist_rpm'
and not develop a whole new way of building python packages when
distutils can already do this.  If something cannot be configured then I
think distutils should be enhanced.

    
bdist_rpm can create a valid rpm.  But it doesn't meet our standards.
For instance, as you've found it doesn't account for the *.pyo files.
These need to be included in the package otherwise they can be created
later at runtime (if python optimize is on and root runs a python
program, for instance) and then leave the unowned *.pyo's on the system.

-Toshio
  
Thomas just had a good suggestion and I tried it and it seems to work and it generates the .pyo files.
My goal is to only use 'bdist' and 'bdist_rpm' configured using setup.cfg to generate apt and rpm files for various distros.  This sure simplifies things.  Are you saying that this is not going to be possible with Fedora/RedHat?

Regards,
Gerry

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux