You are not logged in.

#1 2019-12-04 22:42:21

archifer
Member
Registered: 2019-07-08
Posts: 39

[SOLVED] How to install python-polib?

I'm trying to install the software and it requires python-polib and every time I install it I get this error:

==> Starting build()...
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2857, in get_entry_map
    ep_map = self._ep_map
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2815, in __getattr__
    raise AttributeError(attr)
AttributeError: _ep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "setup.py", line 38, in <module>
    setup(
  File "/usr/lib/python3.8/site-packages/setuptools/__init__.py", line 144, in setup
    _install_setup_requires(attrs)
  File "/usr/lib/python3.8/site-packages/setuptools/__init__.py", line 132, in _install_setup_requires
    dist = distutils.core.Distribution(dict(
  File "/usr/lib/python3.8/site-packages/setuptools/dist.py", line 444, in __init__
    for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'):
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 656, in <genexpr>
    for entry in dist.get_entry_map(group).values()
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2859, in get_entry_map
    ep_map = self._ep_map = EntryPoint.parse_map(
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2527, in parse_map
    for group, lines in data:
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3199, in split_sections
    for line in yield_lines(s):
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2387, in yield_lines
    for ss in strs:
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2767, in _get_metadata
    for line in self.get_metadata_lines(name):
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1432, in get_metadata_lines
    return yield_lines(self.get_metadata(name))
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1420, in get_metadata
    value = self._get(path)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1616, in _get
    with open(path, 'rb') as stream:
PermissionError: [Errno 13] Permission denied: '/usr/lib/python3.8/site-packages/pip-19.3.1.dist-info/entry_points.txt'
==> ERROR: A failure occurred in build().
    Aborting...
Error making: python-polib

I tried it to install with pip3 and it seems to be installed fine but the software won't see it in the system and still asks for python-polib to be installed.

Last edited by archifer (2019-12-12 11:48:01)

Offline

#2 2019-12-04 23:59:02

loqs
Member
Registered: 2014-03-06
Posts: 9,583

Re: [SOLVED] How to install python-polib?

Builds correctly on this system in a clean chroot

$ git clone https://aur.archlinux.org/python-polib.git
Cloning into 'python-polib'...
remote: Enumerating objects: 12, done.
remote: Counting objects: 100% (12/12), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 12 (delta 0), reused 12 (delta 0)
Unpacking objects: 100% (12/12), done.
$ cd python-polib/
$ extra-x86_64-build 
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
:: Starting full system upgrade...
 there is nothing to do
==> Building in chroot for [extra] (x86_64)...
==> Synchronizing chroot copy [/var/lib/archbuild/extra-x86_64/root] -> [testuser]...done
==> Making package: python-polib 1.1.0-2 (Wed Dec  4 23:54:18 2019)
==> Retrieving sources...
  -> Downloading polib-1.1.0.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   122  100   122    0     0   1079      0 --:--:-- --:--:-- --:--:--  1079
100   270  100   270    0     0    647      0 --:--:-- --:--:-- --:--:--   647
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  154k  100  154k    0     0   189k      0 --:--:-- --:--:-- --:--:--  189k
==> Validating source files with sha256sums...
    polib-1.1.0.tar.gz ... Passed
==> Making package: python-polib 1.1.0-2 (Wed 04 Dec 2019 11:54:22 PM)
==> Checking runtime dependencies...
==> Installing missing dependencies...
resolving dependencies...
looking for conflicting packages...

Packages (3) libnsl-1.2.0-2  python-3.8.0-1  python2-2.7.17-1

Total Installed Size:  227.10 MiB

:: Proceed with installation? [Y/n] 
(3/3) checking keys in keyring                     [######################] 100%
(3/3) checking package integrity                   [######################] 100%
(3/3) loading package files                        [######################] 100%
(3/3) checking for file conflicts                  [######################] 100%
:: Processing package changes...
(1/3) installing libnsl                            [######################] 100%
(2/3) installing python                            [######################] 100%
Optional dependencies for python
    python-setuptools
    python-pip
    sqlite [installed]
    mpdecimal: for decimal
    xz: for lzma [installed]
    tk: for tkinter
(3/3) installing python2                           [######################] 100%
Optional dependencies for python2
    tk: for IDLE
    python2-setuptools
    python2-pip
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found polib-1.1.0.tar.gz
==> WARNING: Skipping all source file integrity checks.
==> Extracting sources...
  -> Extracting polib-1.1.0.tar.gz with bsdtar
==> Starting build()...
running build
running build_py
creating build
creating build/lib
copying polib.py -> build/lib
==> Entering fakeroot environment...
==> Starting package_python-polib()...
running install
running build
running build_py
running install_lib
creating /build/python-polib/pkg/python-polib/usr
creating /build/python-polib/pkg/python-polib/usr/lib
creating /build/python-polib/pkg/python-polib/usr/lib/python3.8
creating /build/python-polib/pkg/python-polib/usr/lib/python3.8/site-packages
copying build/lib/polib.py -> /build/python-polib/pkg/python-polib/usr/lib/python3.8/site-packages
byte-compiling /build/python-polib/pkg/python-polib/usr/lib/python3.8/site-packages/polib.py to polib.cpython-38.pyc
writing byte-compilation script '/tmp/tmpl8avyri_.py'
/usr/bin/python /tmp/tmpl8avyri_.py
removing /tmp/tmpl8avyri_.py
running install_egg_info
Writing /build/python-polib/pkg/python-polib/usr/lib/python3.8/site-packages/polib-1.1.0-py3.8.egg-info
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "python-polib"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Starting package_python2-polib()...
running install
running build
running build_py
running install_lib
creating /build/python-polib/pkg/python2-polib/usr
creating /build/python-polib/pkg/python2-polib/usr/lib
creating /build/python-polib/pkg/python2-polib/usr/lib/python2.7
creating /build/python-polib/pkg/python2-polib/usr/lib/python2.7/site-packages
copying build/lib/polib.py -> /build/python-polib/pkg/python2-polib/usr/lib/python2.7/site-packages
byte-compiling /build/python-polib/pkg/python2-polib/usr/lib/python2.7/site-packages/polib.py to polib.pyc
writing byte-compilation script '/tmp/tmpwlniuQ.py'
/usr/bin/python2 -O /tmp/tmpwlniuQ.py
removing /tmp/tmpwlniuQ.py
running install_egg_info
Writing /build/python-polib/pkg/python2-polib/usr/lib/python2.7/site-packages/polib-1.1.0-py2.7.egg-info
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "python2-polib"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: python-polib 1.1.0-2 (Wed 04 Dec 2019 11:54:29 PM)
==> Installing python-polib package group with pacman -U...
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (2) python-polib-1.1.0-2  python2-polib-1.1.0-2

Total Installed Size:  0.35 MiB

:: Proceed with installation? [Y/n] 
(2/2) checking keys in keyring                     [######################] 100%
(2/2) checking package integrity                   [######################] 100%
(2/2) loading package files                        [######################] 100%
(2/2) checking for file conflicts                  [######################] 100%
:: Processing package changes...
(1/2) installing python-polib                      [######################] 100%
(2/2) installing python2-polib                     [######################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
resolving dependencies...
looking for conflicting packages...

Packages (5) elfutils-0.177-2  licenses-20191011-2  pyalpm-0.9.0-3
             python-pyelftools-0.25-3  namcap-3.2.8-5

Total Installed Size:  3.70 MiB

:: Proceed with installation? [Y/n] 
(5/5) checking keys in keyring                     [######################] 100%
(5/5) checking package integrity                   [######################] 100%
(5/5) loading package files                        [######################] 100%
(5/5) checking for file conflicts                  [######################] 100%
:: Processing package changes...
(1/5) installing pyalpm                            [######################] 100%
(2/5) installing licenses                          [######################] 100%
(3/5) installing elfutils                          [######################] 100%
(4/5) installing python-pyelftools                 [######################] 100%
(5/5) installing namcap                            [######################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
Checking PKGBUILD
PKGBUILD (python-polib) W: Missing Maintainer tag
Checking python2-polib-1.1.0-2-any.pkg.tar.xz
python2-polib W: Dependency included and not needed ('python2')
Checking python-polib-1.1.0-2-any.pkg.tar.xz
python-polib W: Dependency included and not needed ('python')
==> Running checkpkg
  -> Downloading current versions
error: target not found: python-polib
error: target not found: python2-polib
==> WARNING: Skipped checkpkg due to missing packages

Offline

#3 2019-12-05 20:06:08

archifer
Member
Registered: 2019-07-08
Posts: 39

Re: [SOLVED] How to install python-polib?

There turned out to be a simple fix

chmod 755 '/usr/lib/python3.8/site-packages/pip-19.3.1.dist-info/entry_points.txt'

now it builds fine.

Offline

#4 2019-12-05 20:12:14

loqs
Member
Registered: 2014-03-06
Posts: 9,583

Re: [SOLVED] How to install python-polib?

Offline

Board footer

Powered by FluxBB