[opensuse-packaging] Dealing with Python3's implicit namespace packages
Hello! Recently, Microsoft switched their Python Azure SDK to use implicit namespace packages (PEP 420 [1]) for Python3. This means, that in order to create a Python namespace, packages no longer need to carry an __init__.py in each namespace directory. This means, that the RPM packages of the Python Azure namespace packages will contain empty directories only. I have tried to convert one of the Azure namespace packages such that for Python3, the RPM contains empty directories only [2]. Unfortunately, I cannot get the package to build this way. RPM keeps complaining that the %{python_sitelib} directory doesn't exist for Python3 even though I marked it with "%dir" and tried various variants to create %{python_sitelib}/azure for Python3 manually. Does anyone have any idea how to deal with implicit namespace packages? Thanks, Adrian
[1] https://www.python.org/dev/peps/pep-0420/ [2] https://build.opensuse.org/package/show/home:glaubitz:branches:devel:languag... -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Feb 28 2019, John Paul Adrian Glaubitz <adrian.glaubitz@suse.com> wrote:
Unfortunately, I cannot get the package to build this way. RPM keeps complaining that the %{python_sitelib} directory doesn't exist for Python3 even though I marked it with "%dir" and tried various variants to create %{python_sitelib}/azure for Python3 manually.
%dir doesn't create directories, it just tells rpm to package only the directory, not it's contents. If there is no such directory, don't package it. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On 2/28/19 2:41 PM, Andreas Schwab wrote:
%dir doesn't create directories, it just tells rpm to package only the directory, not it's contents.
Yes, I'm aware of that. I got it working now.
If there is no such directory, don't package it.
The directory needs to be present for Python3 to create the namespace. Adrian -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Feb 28 2019, John Paul Adrian Glaubitz <adrian.glaubitz@suse.com> wrote:
The directory needs to be present for Python3 to create the namespace.
Really? Then why doesn't the installer create it? That looks like a serious bug. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (2)
-
Andreas Schwab
-
John Paul Adrian Glaubitz