Opened 6 years ago

Closed 6 years ago

#58393 closed defect (invalid)

py-spdx-lookup: missing runtime dependency on py-spdx

Reported by: mojca (Mojca Miklavec) Owned by: Korusuke (Karan Sheth)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: reneeotten (Renee Otten)
Port: py-spdx-lookup py-upt

Description

> upt-3.7
Traceback (most recent call last):
  File "/opt/local/bin/upt-3.7", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3241, in <module>
    @_call_aside
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3225, in _call_aside
    f(*args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3254, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'spdx>=2.3.0' distribution was not found and is required by spdx-lookup

(Karan, please log in to trac with your github account.)

Change History (5)

comment:1 Changed 6 years ago by reneeotten (Renee Otten)

I am not sure I understand this.... py-upt declares a dependency on py-spdx-lookup, which in turn declares a dependency on py-spdx.

If I do sudo port -dv install py37-upt it all works as intended and reports the correct dependencies:

The following dependencies will be installed:
 py37-spdx
 py37-spdx-lookup
 py37-upt-cpan
 py37-upt-macports
 py37-upt-pypi

Are you sure you installed the version after the PR got merged and not have some older versions around by chance. Can you please uninstall all py-upt-* and py-spdx-* ports and try again?

Last edited 6 years ago by reneeotten (Renee Otten) (previous) (diff)

comment:2 Changed 6 years ago by Korusuke (Karan Sheth)

In a try to replicate this issue, I tried uninstalling all the ports related to upt and spdx and then just installing upt using sudo port -vst install py-upt and even then all seems to work fine for me.

But then when I tried removing py-spdx-lookup from the dependency of py-spdx and doing the same again, even than it worked, so maybe it's working only on my system. Even removing py-spdx from py-upt dependency has no effect for me which I found odd as this should have given an error, maybe I did something wrong, looking into it now.

comment:3 Changed 6 years ago by Korusuke (Karan Sheth)

I removed py-spdx dependency from py-upt and then Uninstalling all ports and then just doing sudo port install py-upt and sudo port install curl-ca-bundle still works for me.

The weird thing about this that I am not able to understand is that neither py-spdx nor py-spdx-lookup are installed and even then upt-3.7 package -f pypi -b macports upt works perfectly.

> port installed
The following ports are currently installed:
  bzip2 @1.0.6_0 (active)
  curl-ca-bundle @7.64.1_0 (active)
  expat @2.2.6_1 (active)
  gettext @0.19.8.1_1 (active)
  gperf @3.1_0 (active)
  libedit @20190324-3.1_0 (active)
  libffi @3.2.1_0 (active)
  libiconv @1.15_0 (active)
  ncurses @6.1_0 (active)
  openssl @1.0.2r_0 (active)
  py-upt @0.6_0 (active)
  py37-certifi @2019.03.09_0 (active)
  py37-chardet @3.0.4_1 (active)
  py37-idna @2.8_0 (active)
  py37-jinja2 @2.10.1_0 (active)
  py37-markupsafe @1.1.1_0 (active)
  py37-requests @2.21.0_0 (active)
  py37-setuptools @41.0.0_0 (active)
  py37-upt @0.6_0 (active)
  py37-upt-cpan @0.4_0 (active)
  py37-upt-macports @0.1-20190425_0 (active)
  py37-upt-pypi @0.3_0 (active)
  py37-urllib3 @1.24.2_0 (active)
  python3_select @0.0_1 (active)
  python37 @3.7.3_0 (active)
  python_select @0.3_8 (active)
  sqlite3 @3.28.0_0 (active)
  xz @5.2.4_0 (active)
  zlib @1.2.11_0 (active)
> upt-3.7 package -f pypi -b macports upt
[INFO    ] [Backend] Hello, creating the package
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           python 1.0

name                py-upt
version             0.6
revision            0

maintainers         nomaintainer
description         Package software from any package manager to any distribution
long_description    ${description}

platforms           darwin
# uncomment and edit the following line depending on whether the port installs architecture-dependent files
# supported_archs     noarch

homepage            https://framagit.org/upt/upt
master_sites        pypi:[string index ${python.rootname} 0]/${python.rootname}
distname            ${python.rootname}-${version}

license             3-clause BSD License
checksums           sha256  707b79dd699f5bdd68ef2eeb66bacfe2f86e0c93f99ad3a5c48b1b6a799b222b \
                    rmd160  3b7b367dde8fe48315708de8cbbcf02034286fd5 \
                    size    23609

python.versions     37

if {${name} ne ${subport}} {

    depends_build-append \
                    port:py${python.version}-setuptools
    depends_lib-append \
                    port:py${python.version}-spdx-lookup
    livecheck.type  none
}

<bound method MacPortsPackage._depends of <upt_macports.upt_macports.MacPortsPythonPackage object at 0x10fbddc50>>

comment:4 Changed 6 years ago by Korusuke (Karan Sheth)

I am not sure but this might be the reason that it is working for me.

> sudo port -vst install py-upt
Warning: The following existing file was hidden from the build system by trace mode:
  /var/db/timezone/zoneinfo/Asia/Kolkata
Warning: The following files inside the MacPorts prefix not installed by a port were accessed:
  /opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/easy-install.pth
  /opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/spdx-2.5.0-py3.7.egg/EGG-INFO/PKG-INFO
  /opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/spdx_lookup-0.3.2-py3.7.egg
  /opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/upt-0.6-py3.7.egg/EGG-INFO/PKG-INFO
  /opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/upt_pypi-0.2.9-py3.7.egg

comment:5 Changed 6 years ago by mojca (Mojca Miklavec)

Resolution: invalid
Status: assignedclosed

Arghhhhhhh.

I'm sorry. I figured out that I had two folders inside my ports: py-spdx-lookup and py-spdx_lookup. One must have been a leftover from my earlier attempts, probably still installed and not depending on py-spdx. I shouldn't be filing tickets after my usual bedtime.

Note: See TracTickets for help on using tickets.