RE: Distribute a Python module, without tying it to a specific version Python?

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

 



 
>> Is it possible to create a RPM package to distribute a python module,
>> without tying it to a specific version Python?
>
>If the module / package is "pure Python", then yes:  best practice 
>anyway is to avoid packaging the ".pyc" / ".pyo" files, and 
>instead use the "local" python to generate them during the "%post"
script.
>
>You would just declare a dependency on the "python" RPM, and use the 
>"canonical" python (/usr/bin/python) to do the recompile.

If you let rpm generate the dependencies, the "binary" rpm is going
to have a version-specific dependency on python.  So you don't
want that.

If you install in a "standard" place, which on Linux could well
be /usr/lib/pythonX.Y/site-packages, then the install path is
also going to expose the python version.

As I've run into this problem a few times, I suspect this
might be what the original question was about. Tell me to
go away if it wasn't....

distutils is probably a better way to distribute python code
than a binary rpm. [ but watch out for distros that didn't
realize distutils is core python, not a development tool...
at least some versions of SuSE require you to install
python-devel to have access to distutils, sigh. ]


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux