From kde-buildsystem Thu Oct 04 21:39:14 2012 From: "Luca Beltrame" Date: Thu, 04 Oct 2012 21:39:14 +0000 To: kde-buildsystem Subject: Re: Review Request: Support Python 3.2's new method of handling byte compiled files in PythonMacros. Message-Id: <20121004213914.21381.90100 () vidsolbach ! de> X-MARC-Message: https://marc.info/?l=kde-buildsystem&m=134942494708458 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============7057486945623451991==" --===============7057486945623451991== Content-Type: multipart/alternative; boundary="===============3393438566402630958==" --===============3393438566402630958== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable > On Oct. 4, 2012, 7:05 p.m., Alexander Neundorf wrote: > > Looks straightforward and obvious. > > Beside that, I don't know much about python byte code compiling. > > Actually it's still not perfect because it does not install files correctly. I tried to IF(PYTHON_SHORT_VERSION GREATER 3.1) INSTALL(FILES ${_bin_pyc} DESTINATION ${DESINATION_DIR}/__pycache__) but it saves them in / rather than in the destination folder. What am I doi= ng wrong? - Luca ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/106707/#review19923 ----------------------------------------------------------- On Oct. 3, 2012, 10:43 a.m., Luca Beltrame wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://git.reviewboard.kde.org/r/106707/ > ----------------------------------------------------------- > = > (Updated Oct. 3, 2012, 10:43 a.m.) > = > = > Review request for Build System. > = > = > Description > ------- > = > Python 3.2 changed the compile mechanism by creating a __pycache__ direct= ory. This obviously breaks a lot of stuff that assumed that pyc files were = stored in the same directory as the py files. This change adds a check, and= adjusts files only in case Python 3.2 is found. Notice that currently I ha= ve way of testing if the suffix (*cpython) is the same on all supported OSe= s. > = > = > Diffs > ----- > = > cmake/modules/PythonMacros.cmake 774c6b2d8eb5f9bafaf7e73da1108bd347a736= 67 = > = > Diff: http://git.reviewboard.kde.org/r/106707/diff/ > = > = > Testing > ------- > = > No more errors are produced when building PyKDE4 with Python 3.2.3 > = > = > Thanks, > = > Luca Beltrame > = > --===============3393438566402630958== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable
This is an automatically generated e-mail. To reply, visit: http://git.revie= wboard.kde.org/r/106707/

On October 4th, 2012, 7:05 p.m., Alexander = Neundorf wrote:

Looks str=
aightforward and obvious.
Beside that, I don't know much about python byte code compiling.
Actually it=
's still not perfect because it does not install files correctly.

I tried to

IF(PYTHON_SHORT_VERSION GREATER 3.1)
    INSTALL(FILES ${_bin_pyc} DESTINATION ${DESINATION_DIR}/__pycache__)

but it saves them in / rather than in the destination folder. What am I doi=
ng wrong?

- Luca


On October 3rd, 2012, 10:43 a.m., Luca Beltrame wrote:

Review request for Build System.
By Luca Beltrame.

Updated Oct. 3, 2012, 10:43 a.m.

Descripti= on

Python 3.2 changed the compile mechanism by creating a __pyc=
ache__ directory. This obviously breaks a lot of stuff that assumed that py=
c files were stored in the same directory as the py files. This change adds=
 a check, and adjusts files only in case Python 3.2 is found. Notice that c=
urrently I have way of testing if the suffix (*cpython) is the same on all =
supported OSes.

Testing <= /h1>
No more errors are produced when building PyKDE4 with Python=
 3.2.3

Diffs=

  • cmake/modules/PythonMacros.cmake (774c6b2d= 8eb5f9bafaf7e73da1108bd347a73667)

View Diff

--===============3393438566402630958==-- --===============7057486945623451991== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem --===============7057486945623451991==--