<feed xmlns='http://www.w3.org/2005/Atom'>
<title>packages/lang/python/python3-package.mk, branch openwrt-21.02</title>
<subtitle>Community maintained packages for OpenWrt</subtitle>
<id>http://x-nagi.com/cgit/packages/atom?h=openwrt-21.02</id>
<link rel='self' href='http://x-nagi.com/cgit/packages/atom?h=openwrt-21.02'/>
<link rel='alternate' type='text/html' href='http://x-nagi.com/cgit/packages/'/>
<updated>2020-08-17T15:05:49Z</updated>
<entry>
<title>python3: Use hash-checking mode when installing host pip packages</title>
<updated>2020-08-17T15:05:49Z</updated>
<author>
<name>Jeffery To</name>
<email>jeffery.to@gmail.com</email>
</author>
<published>2020-08-15T06:33:30Z</published>
<link rel='alternate' type='text/html' href='http://x-nagi.com/cgit/packages/commit/?id=722a5b8efa19fd54728af462441dce08cd7e545b'/>
<id>urn:sha1:722a5b8efa19fd54728af462441dce08cd7e545b</id>
<content type='text'>
In hash-checking mode[1], pip will verify downloaded package archives
(source tarballs in our case) against known SHA256 hashes before
installing the packages.

As a consequence, this requires the use of requirements files[2] and
pinning packages to known versions.

The syntax for package Makefiles has changed slightly;
HOST_PYTHON3_PACKAGE_BUILD_DEPENDS no longer accepts requirement
specifiers like "foo&gt;=1.0", only requirements file names (which are the
same as package names in the most common case).

This also updates affected packages, in particular:

* python-zipp: "setuptools_scm[toml]" has been split into
  "setuptools-scm toml" to reuse the requirements file for
  setuptools-scm (the extra depends installed by "setuptools_scm[toml]"
  is toml).

* python-pycparser: This previously used ply 3.10, whereas the
  requirements file will now install 3.11.

[1]: https://pip.pypa.io/en/stable/reference/pip_install/#hash-checking-mode
[2]: https://pip.pypa.io/en/stable/user_guide/#requirements-files

Signed-off-by: Jeffery To &lt;jeffery.to@gmail.com&gt;
</content>
</entry>
<entry>
<title>python3: Use default _PYTHON_HOST_PLATFORM</title>
<updated>2020-07-08T09:11:42Z</updated>
<author>
<name>Jeffery To</name>
<email>jeffery.to@gmail.com</email>
</author>
<published>2020-07-08T08:02:49Z</published>
<link rel='alternate' type='text/html' href='http://x-nagi.com/cgit/packages/commit/?id=0973d21787868192b63ff353b9bb91b3de68702a'/>
<id>urn:sha1:0973d21787868192b63ff353b9bb91b3de68702a</id>
<content type='text'>
This lets the Python build process set _PYTHON_HOST_PLATFORM instead of
forcing an explicit value.

Also:

* Save the target _PYTHON_HOST_PLATFORM value during Build/InstallDev
  for use when building target Python packages (in python3-package.mk).

* Use the (mostly) default PYTHON_FOR_BUILD value, instead patch
  configure to remove the platform triplet from the sysconfigdata file
  name.

* Remove the "CROSS_COMPILE=yes" make variable (there is no indication
  that this variable is necessary).

* Force host pip to build packages from source instead of downloading
  binary wheels.

  Previously, host pip can download universal (platform-independent)
  wheels but not platform-specific wheels, because of the custom
  _PYTHON_HOST_PLATFORM value. (Packages that do not have universal
  wheels would be compiled from source.)

  With a correct _PYTHON_HOST_PLATFORM, host pip can install
  platform-specific wheels as well. However, the pre-built shared object
  (.so) files in these wheels will have the host's platform triplet in
  their file names. When target Python packages are built (using the
  target's _PYTHON_HOST_PLATFORM), Python will not use these shared
  object files.

  By forcing host pip to build packages from source, the built shared
  object files will not have the platform triplet in their file names.
  (Host Python has been patched to remove the platform triplet from file
  names.) This allows these packages to be used when building target
  Python packages.

  (The net effect of this complete change is that platform-dependent
  packages will continue to be compiled from source, while
  platform-independent packages will now also be compiled from source.)

Signed-off-by: Jeffery To &lt;jeffery.to@gmail.com&gt;
</content>
</entry>
<entry>
<title>python3: Add script to help find standard library dependencies</title>
<updated>2020-05-14T15:38:24Z</updated>
<author>
<name>Jeffery To</name>
<email>jeffery.to@gmail.com</email>
</author>
<published>2020-05-10T11:14:25Z</published>
<link rel='alternate' type='text/html' href='http://x-nagi.com/cgit/packages/commit/?id=d4d78c2511177758a8910dab76ebbc576bbf3df8'/>
<id>urn:sha1:d4d78c2511177758a8910dab76ebbc576bbf3df8</id>
<content type='text'>
This adds a script that searches a Python package's source code to find
imports for separately-packaged standard library modules.

The script can be run by calling make with the configure target and
"PY3=stdlib V=s" arguments, e.g.

    make package/python3-lxml/configure PY3=stdlib V=s

This also updates the readme on how to call this script, as well as more
information on Python package dependencies in general.

Signed-off-by: Jeffery To &lt;jeffery.to@gmail.com&gt;
</content>
</entry>
<entry>
<title>python3: Use PYTHON3_PKG_BUILD to control default Python package build</title>
<updated>2020-04-18T17:56:23Z</updated>
<author>
<name>Jeffery To</name>
<email>jeffery.to@gmail.com</email>
</author>
<published>2020-04-17T14:09:32Z</published>
<link rel='alternate' type='text/html' href='http://x-nagi.com/cgit/packages/commit/?id=9636f6f4477c228e0b3c23f4082b53ab7c61f3ce'/>
<id>urn:sha1:9636f6f4477c228e0b3c23f4082b53ab7c61f3ce</id>
<content type='text'>
This replaces the use of BUILD_VARIANT with PYTHON3_PKG_BUILD to opt
in/out of the default Python package build recipe (Py3Build/Compile).

PYTHON3_PKG_BUILD defaults to true (1), i.e. if a package includes
python3-package.mk, then by default it will set the package's
Build/Compile to Py3Build/Compile.

If PYTHON3_PKG_BUILD is set to 0 before python3-package.mk is included,
then Build/Compile will not be modified.

Signed-off-by: Jeffery To &lt;jeffery.to@gmail.com&gt;
</content>
</entry>
<entry>
<title>python3: Remove MIPS16 changes from python3-package.mk</title>
<updated>2020-04-18T17:56:23Z</updated>
<author>
<name>Jeffery To</name>
<email>jeffery.to@gmail.com</email>
</author>
<published>2020-04-15T13:58:40Z</published>
<link rel='alternate' type='text/html' href='http://x-nagi.com/cgit/packages/commit/?id=58719a3c4bd75479f992982bef3b77fef8310726'/>
<id>urn:sha1:58719a3c4bd75479f992982bef3b77fef8310726</id>
<content type='text'>
There are no bug reports or other evidence to suggest Python is not
compatible with MIPS16 compilation.

Signed-off-by: Jeffery To &lt;jeffery.to@gmail.com&gt;
</content>
</entry>
<entry>
<title>python3: Minor edits for python3-package.mk</title>
<updated>2020-04-18T17:56:23Z</updated>
<author>
<name>Jeffery To</name>
<email>jeffery.to@gmail.com</email>
</author>
<published>2020-04-15T13:55:17Z</published>
<link rel='alternate' type='text/html' href='http://x-nagi.com/cgit/packages/commit/?id=ba127c155a104be0a93c6f85877db0d6f27ba9df'/>
<id>urn:sha1:ba127c155a104be0a93c6f85877db0d6f27ba9df</id>
<content type='text'>
* Remove PYTHON3_BIN_DIR, it isn't used anywhere in the repo
* Rephrase *-src package description
* Reduce Py3Package/$(1)/install indentation

Signed-off-by: Jeffery To &lt;jeffery.to@gmail.com&gt;
</content>
</entry>
<entry>
<title>python3: Add canned recipe to invoke filespec processing</title>
<updated>2020-04-18T17:56:23Z</updated>
<author>
<name>Jeffery To</name>
<email>jeffery.to@gmail.com</email>
</author>
<published>2020-04-15T07:11:01Z</published>
<link rel='alternate' type='text/html' href='http://x-nagi.com/cgit/packages/commit/?id=c9b260f5ae9aee3de15f704ee454acfdef4c7579'/>
<id>urn:sha1:c9b260f5ae9aee3de15f704ee454acfdef4c7579</id>
<content type='text'>
This extracts filespec export and processing into
Py3Package/ProcessFilespec.

This also allows the filespec variable to be explicitly set to an empty
value, to bypass filespec processing. (The default filespec is also
available as Py3Package/filespec/Default to be explicitly assigned to
the filespec variable.)

Signed-off-by: Jeffery To &lt;jeffery.to@gmail.com&gt;
</content>
</entry>
<entry>
<title>python3: Move functionality into python3-package.mk</title>
<updated>2020-04-18T17:56:23Z</updated>
<author>
<name>Jeffery To</name>
<email>jeffery.to@gmail.com</email>
</author>
<published>2020-04-14T13:14:49Z</published>
<link rel='alternate' type='text/html' href='http://x-nagi.com/cgit/packages/commit/?id=3cdca38dce01553766b032d8bbfce08a35d6555e'/>
<id>urn:sha1:3cdca38dce01553766b032d8bbfce08a35d6555e</id>
<content type='text'>
This moves functionality from python-package-install.sh into
python3-package.mk, so that they can be reused separate from filespec
processing.

Signed-off-by: Jeffery To &lt;jeffery.to@gmail.com&gt;
</content>
</entry>
<entry>
<title>python3: Reorder recipes in python3-package.mk</title>
<updated>2020-04-18T17:56:23Z</updated>
<author>
<name>Jeffery To</name>
<email>jeffery.to@gmail.com</email>
</author>
<published>2020-04-10T14:22:58Z</published>
<link rel='alternate' type='text/html' href='http://x-nagi.com/cgit/packages/commit/?id=0bc1bf55781e31a3513a6a6269f1003b4344d04e'/>
<id>urn:sha1:0bc1bf55781e31a3513a6a6269f1003b4344d04e</id>
<content type='text'>
Group Python3/* recipes together, group Py3Package and Py3Build
together.

This also adds headings and whitespace to separate major sections.

Signed-off-by: Jeffery To &lt;jeffery.to@gmail.com&gt;
</content>
</entry>
<entry>
<title>python3: Rename canned recipes in python3-package.mk</title>
<updated>2020-04-18T17:56:23Z</updated>
<author>
<name>Jeffery To</name>
<email>jeffery.to@gmail.com</email>
</author>
<published>2020-04-09T15:28:07Z</published>
<link rel='alternate' type='text/html' href='http://x-nagi.com/cgit/packages/commit/?id=fc8387614ccd919e5c2308d61924fb5a994c83c5'/>
<id>urn:sha1:fc8387614ccd919e5c2308d61924fb5a994c83c5</id>
<content type='text'>
This renames "internal" recipes to use the Python3/ prefix and clarifies
the names (RunTarget to Run, Mod to ModSetup, Shebang to FixShebang).

Signed-off-by: Jeffery To &lt;jeffery.to@gmail.com&gt;
</content>
</entry>
</feed>
