Package Details: pip2pkgbuild 0.3.9-1

Git Clone URL: https://aur.archlinux.org/pip2pkgbuild.git (read-only, click to copy)
Package Base: pip2pkgbuild
Description: Generate PKGBUILD file for a Python module from PyPI
Upstream URL: https://github.com/wenLiangcan/pip2pkgbuild
Keywords: packaging pkgbuild python
Licenses: MIT
Submitter: wenLiangcan
Maintainer: wenLiangcan
Last Packager: wenLiangcan
Votes: 25
Popularity: 0.23
First Submitted: 2015-09-15 12:49 (UTC)
Last Updated: 2024-02-21 15:50 (UTC)

Latest Comments

1 2 Next › Last »

RubenKelevra commented on 2024-07-20 00:04 (UTC)

Does not build in a chroot:

==> Starting build()...
* Getting build dependencies for wheel...

Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/pyproject_hooks/_impl.py", line 402, in _call_hook
    raise BackendUnavailable(
pyproject_hooks._impl.BackendUnavailable: Cannot import 'setuptools.build_meta'

ERROR Backend 'setuptools.build_meta:__legacy__' is not available.
==> ERROR: A failure occurred in build().

frankspace commented on 2024-05-24 12:43 (UTC)

Yeah, imp was deprecated for a long time and has finally been removed. The imp.load_source function has no tidy replacement, to the annoyance of many, but the following patch appears to get the job done:

--- a/setup.py
+++ b/setup.py
@@ -1,11 +1,20 @@
-import imp
+import importlib
+import importlib.util
+import importlib.machinery
 import io
 import os

 from setuptools import find_packages, setup

+def load_source(modname, filename):
+    loader = importlib.machinery.SourceFileLoader(modname, filename)
+    spec = importlib.util.spec_from_file_location(modname, filename, loader=loader)
+    module = importlib.util.module_from_spec(spec)
+    loader.exec_module(module)
+    return module
+
 here = os.path.abspath(os.path.dirname(__file__))
-META = imp.load_source('',
+META = load_source('',
                        os.path.join(here, 'pip2pkgbuild/pip2pkgbuild.py')).META
 with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
     long_description = os.linesep + f.read()
@@ -41,6 +50,12 @@
         'Programming Language :: Python :: 3.4',
         'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: 3.6',
+        'Programming Language :: Python :: 3.7',
+        'Programming Language :: Python :: 3.8',
+        'Programming Language :: Python :: 3.9',
+        'Programming Language :: Python :: 3.10',
+        'Programming Language :: Python :: 3.11',
+        'Programming Language :: Python :: 3.12',

         'Topic :: Software Development :: Build Tools',
         'Topic :: Software Development :: Code Generators',

(Probably only the first change is actually necessary; the second bit with the "programming language" additions is just something I tossed in while I was there anyway.) I called it "importlib_patch.patch" and applied it in a prepare().

Also, I reiterate that I need python-setuptools added to the makedepends for this to compile in a chroot.

tzok commented on 2024-05-24 08:49 (UTC)

The package does not work with Python 3.12:

ModuleNotFoundError: No module named 'imp'

mreeves87 commented on 2024-05-05 05:13 (UTC)

It looks like the upstream package is itself incompatible with python 3.12.

frankspace commented on 2023-12-16 19:46 (UTC)

Nope. I still need to install python-setuptools. If I don't, I get the following error:

==> Starting build()...
* Getting build dependencies for wheel...

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/pyproject_hooks/_impl.py", line 321, in _call_hook
    raise BackendUnavailable(data.get('traceback', ''))
pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend
    obj = import_module(mod_path)
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'setuptools'

ERROR Backend 'setuptools.build_meta:__legacy__' is not available.
==> ERROR: A failure occurred in build().
    Aborting...

I may not be understanding this correctly, but it looks as if pip2pkgbuild permits creation of PEP517 PKGBUILDs, not necessarily that it is itself a PEP517 package. According to section 4.2 of the wiki, if there's no pyproject.toml or build-system table, and it has a setup.py file, then it uses setuptools or distutils; and I notice the upstream package does in fact have a setup.py file in it.

wenLiangcan commented on 2023-12-06 12:54 (UTC)

Added python-wheel, according to the wiki only those three packages are required as mkdepends for PEP517 based package. Let me know if you encounter problem without python-setuptools.

frankspace commented on 2023-12-03 18:58 (UTC)

This will not compile in a chroot for me without also explicitly installing python-setuptools and python-wheel. I don't know whether those are dependencies or makedependencies, but would you please consider adding them as some kind of dependencies? Thank you!

jose1711 commented on 2023-11-09 13:16 (UTC)

conflicts with python2-pip2pkgbuild

wenLiangcan commented on 2023-08-14 13:17 (UTC)

Alright, done.