<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/classes/distutils3.bbclass, branch hardknott-next</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=hardknott-next</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=hardknott-next'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2020-12-15T22:51:55+00:00</updated>
<entry>
<title>distutils3: allow setup.py to be run from a different directory to ${S}</title>
<updated>2020-12-15T22:51:55+00:00</updated>
<author>
<name>Jack Mitchell</name>
<email>ml@embed.me.uk</email>
</author>
<published>2020-12-08T16:03:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=df7bccf25496393ee58ec28afb00ad42d7abf70e'/>
<id>urn:sha1:df7bccf25496393ee58ec28afb00ad42d7abf70e</id>
<content type='text'>
Sometimes setup.py can be buried deep in a source tree. This has
traditionally been solved with setting S to the subdirectory in
the source. However with the new pseudo changes, some python modules
make changes to files beneath ${S}, for example:

S = "${WORKDIR}/git/python/pythonmodule"

then in setup.py it works with source code in a relative fashion, such
as:

../../src

This causes pseudo to abort as it isn't tracking the paths. Therefore
implement the variable DISTUTILS_SETUP_PATH so that recipes can use:

S = "${WORKDIR}/git"
DISTUTILS_SETUP_PATH = "${S}/python/pythonmodule"

inherit distutils3

This allows the full source tree to be monitored, while distutils
can run setup.py from a location other than ${S}.

(From OE-Core rev: ddcc349cede0c4fe1909df1ded7b0a7c509cd758)

Signed-off-by: Jack Mitchell &lt;ml@embed.me.uk&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>distutils3: do out of tree builds</title>
<updated>2019-12-28T23:25:41+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross.burton@intel.com</email>
</author>
<published>2019-12-10T13:42:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=8b1eb782c32d8ce31e8f033ef3197e4be76bfc84'/>
<id>urn:sha1:8b1eb782c32d8ce31e8f033ef3197e4be76bfc84</id>
<content type='text'>
Pass --build-base so the build tree is a location we specify, which we
can ensure is empty when building.

This means we can stub out do_configure entirely and use cleandirs
instead.

When installing we need to tell it to do a build so that we can pass
--build-base, so also pass --skip-build to avoid the potential rebuild.

(From OE-Core rev: de1b57acedaaf01e10059792eb0031ceafcc8b97)

Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>distutils3: remove unused variable</title>
<updated>2019-12-28T23:25:41+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross.burton@intel.com</email>
</author>
<published>2019-12-10T21:17:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=8b57f9c53444dc5f00119c814a9a6ded71f49c25'/>
<id>urn:sha1:8b57f9c53444dc5f00119c814a9a6ded71f49c25</id>
<content type='text'>
This variable isn't used by the build task, despite it's name.

(From OE-Core rev: 497ddaca42f805c119c022d77960d1eecc01436b)

Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>distutils3: remove unused stage tasks</title>
<updated>2019-12-28T23:25:41+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross.burton@intel.com</email>
</author>
<published>2019-12-10T13:37:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=062430b729a4743e3472750c44630999e82dc7c6'/>
<id>urn:sha1:062430b729a4743e3472750c44630999e82dc7c6</id>
<content type='text'>
These staging tasks haven't been used since ~2010, so remove them.

(From OE-Core rev: d0eba7ccf54101e708ea50afb072f1bd2cf8fb6d)

Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>distutils: Tidy and simplify for readability</title>
<updated>2019-05-15T16:53:29+00:00</updated>
<author>
<name>Douglas Royds</name>
<email>douglas.royds@taitradio.com</email>
</author>
<published>2019-05-14T05:55:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=3de77b33eecbf6e65e5d9d1eedb5f2aea3886766'/>
<id>urn:sha1:3de77b33eecbf6e65e5d9d1eedb5f2aea3886766</id>
<content type='text'>
Line lengths, remove duplication, and use the PYTHON variable provided by
pythonnative.bbclass.

Coincidentally fixes a dormant defect in distutils3.bbclass in which we were
sedding for STAGING_BINDIR_NATIVE/python-python3/python3.

(From OE-Core rev: 7b8dd17c65e2d7d163f452833f21469918bf222e)

Signed-off-by: Douglas Royds &lt;douglas.royds@taitradio.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>distutils: Run python from the PATH in the -native case as well</title>
<updated>2019-05-08T11:15:17+00:00</updated>
<author>
<name>Douglas Royds</name>
<email>douglas.royds@taitradio.com</email>
</author>
<published>2019-05-06T06:47:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a839671f6e029d0fe8c131d37127b5a5906494e5'/>
<id>urn:sha1:a839671f6e029d0fe8c131d37127b5a5906494e5</id>
<content type='text'>
The python distutils generate a python wrapper script for each package,
containing shebang lines pointing to the python executable.
In our case, this is a fully-qualified path to python-native in the
recipe-sysroot-native.

Ubuntu 18.04 restricts the useful length of the shebang line to 125
characters, and Ubuntu 16.04 restricts it to 77. In both cases, the
staged python script fails to run due to the length of the path to
the python-native executable.

Replace the shebang line with nativepython or nativepython3 as appropriate.
The nativepython symlink is installed by the python-native recipe:

    #!/usr/bin/env nativepython

We were already doing this for on-target distutils components.
This change applies the sed-line to -native distutils components as well.
In this way, -native clients of these components can invoke the wrapper scripts
directly, without themselves needing to inherit pythonnative.

This works around a known setuptools issue:
https://github.com/pypa/setuptools/issues/494
Even once this issue has been resolved upstream,
we will still need to replace `python` with `nativepython`

(From OE-Core rev: 0a5bd4f30182a3d55153e5ade76f1dfd5b52b482)

Signed-off-by: Douglas Royds &lt;douglas.royds@taitradio.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>distutils{, 3}.bbclass: improve error messages</title>
<updated>2018-09-22T01:45:46+00:00</updated>
<author>
<name>Jens Rehsack</name>
<email>sno@netbsd.org</email>
</author>
<published>2018-09-19T09:24:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ef753fc7b3a58596403417381abede5193ef2ddd'/>
<id>urn:sha1:ef753fc7b3a58596403417381abede5193ef2ddd</id>
<content type='text'>
For non-python developers it's difficult to identify where start
searching in case of errors. Fixing and marking the string to
grep for might help finding some root causes of issues slightly
quicker.

(From OE-Core rev: 44fff749ee7bfe47e88286aec1e8a22e63079ca7)

Signed-off-by: Jens Rehsack &lt;sno@netbsd.org&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>distutils/distutils3: do not try to fetch code during do_configure</title>
<updated>2018-07-30T11:44:35+00:00</updated>
<author>
<name>Hongxu Jia</name>
<email>hongxu.jia@windriver.com</email>
</author>
<published>2018-07-26T14:50:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ce31c498f8fd6332ba81fb60c6406ea1cd7bc4d6'/>
<id>urn:sha1:ce31c498f8fd6332ba81fb60c6406ea1cd7bc4d6</id>
<content type='text'>
For distutils3, any setup.py invoking will cause setup_requires
argument to trigger a code fetching. Since the following commit
applied in oe-core, code fetching occurs during do_confugire
before the do_compile.
...
b805cef distutils: clean the build tree in do_configure
...

Refer what do_compile did, add var-NO_FETCH_BUILD to do_configure.

Sync with distutils3, add do_configure to distutils also.

[YOCTO #12084]

(From OE-Core rev: 9d556092fcc6f04c487afd126d52935bac133165)

Signed-off-by: Hongxu Jia &lt;hongxu.jia@windriver.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>distutils/setuptools, distutils3/setuptools3: improve reproducibility</title>
<updated>2018-07-26T12:16:40+00:00</updated>
<author>
<name>Hongxu Jia</name>
<email>hongxu.jia@windriver.com</email>
</author>
<published>2018-07-19T14:59:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=896b36074641ad5120ca29888d1e71199aa1b1e0'/>
<id>urn:sha1:896b36074641ad5120ca29888d1e71199aa1b1e0</id>
<content type='text'>
- Unify var-DISTUTILS_INSTALL_ARGS in distutils and setuptools

- Supply "--root" directory to the "install" command, and use
  it as a prefix to strip off the purported filename encoded
  in bytecode files. (It strips build path prefix from .pyc files)

[YOCTO #8446]
[YOCTO #12084]

(From OE-Core rev: 21f0c5a50e00ac34975d79fd48f08730d8f19b15)

Signed-off-by: Hongxu Jia &lt;hongxu.jia@windriver.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>distutils/setuptools-native, distutils3/setuptools3-native: do not try to fetch code during do_compile</title>
<updated>2018-07-26T12:16:40+00:00</updated>
<author>
<name>Hongxu Jia</name>
<email>hongxu.jia@windriver.com</email>
</author>
<published>2018-07-17T13:36:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=8fdbb0381dc7d9beee30c38e41e140b0a7c2838b'/>
<id>urn:sha1:8fdbb0381dc7d9beee30c38e41e140b0a7c2838b</id>
<content type='text'>
If a python recipe is using setuptools and the setup_requires argument, where
setuptools will use easy_install to fetch the module if it isn't
present.

The build failed on a machine where a proxy was required, but succeeded on a
machine which had direct access to the internet

Add var-NO_FETCH_BUILD, and set it in distutils_do_compile which does not
allow to fetch code from internet during do_compile.

Example result:
...
ERROR: Do not try to fetch `pytest-runner1' for building. Please add its native recipe to DEPENDS.
Traceback (most recent call last):
  File "setup.py", line 56, in &lt;module&gt;
...

The improvement is flexible for test_requirements argument (used at
`setup.py test'), where use easy_install also.

[YOCTO #12084]
(From OE-Core rev: 57414f4a1c549e6faaa110e6e95ff601b05b7361)

Signed-off-by: Hongxu Jia &lt;hongxu.jia@windriver.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
