Re: Python 3.2a1 in rawhide

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

 



On 08/23/2010 03:34 AM, Orcan Ogetbil wrote:
> On Sat, Aug 21, 2010 at 6:48 PM, David Malcolm wrote:
>> I just built Python 3.2a1 into rawhide:
>>   http://koji.fedoraproject.org/koji/buildinfo?buildID=191382
>> so the meaning of "python3" in rawhide just jumped from Python 3.1 to
>> Python 3.2
> [cut]
>> with Python 3.2 onwards you now have a __pycache__ directory:
> [cut]
>> The idea is to permit sharing of modules between multiple
>> parallel-installable versions of Python.
>>
>
> I am not sure that I understood this correctly. There will be a
> __pycache__ directory in the following structure:
>
> /usr/lib/python3.2/site-packages/foo/foo.py
> /usr/lib/python3.2/site-packages/foo/__pycache__/foo.cpython-32.pyc
> /usr/lib/python3.2/site-packages/foo/__pycache__/foo.cpython-32.pyo
>
> But now when the user installs python-3.3, he will have
>
> /usr/lib/python3.3/site-packages/foo/foo.py
> /usr/lib/python3.3/site-packages/foo/__pycache__/foo.cpython-33.pyc
> /usr/lib/python3.3/site-packages/foo/__pycache__/foo.cpython-33.pyo
>
> The two directories have different roots /usr/lib/python3.*/ and the
> module foo.py is not shared.
>
> Where is the catch?

/usr/lib/python*/ isn't the only place where Python bytecode files are
installed. I'd imagine that the new structure is far more useful in
other places where Python version isn't already encoded in the directory
name. For example, currently the RabbitVCS nautilus extension installs
the following files:
/usr/lib64/nautilus/extensions-2.0/python/RabbitVCS.py
/usr/lib64/nautilus/extensions-2.0/python/RabbitVCS.pyc
/usr/lib64/nautilus/extensions-2.0/python/RabbitVCS.pyo

With the new directory structure the bytecompiled files would end up
named differently for each Python parallel-installable version:
/usr/lib64/nautilus/extensions-2.0/python/RabbitVCS.py
/usr/lib64/nautilus/extensions-2.0/python/__pycache__/RabbitVCS.cpython-33.pyc
/usr/lib64/nautilus/extensions-2.0/python/__pycache__/RabbitVCS.cpython-33.pyo

-- 
Kalev
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel


[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