Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make build fails after regenerating the pypi-dependencies.json #26

Open
Roming22 opened this issue Dec 26, 2020 · 8 comments
Open

make build fails after regenerating the pypi-dependencies.json #26

Roming22 opened this issue Dec 26, 2020 · 8 comments

Comments

@Roming22
Copy link
Contributor

make build ends in error:

> make build
>>> Downloading dependencies (in build_dir=/home/rarnaud/Code/k3x/.flatpak-builder/build/staging)...
Emptying app dir '/home/rarnaud/Code/k3x/.flatpak-builder/build/staging'
Downloading sources
Stopping at module k3x
>>> Building dependencies (in build_dir=/home/rarnaud/Code/k3x/.flatpak-builder/build/staging)...
Starting build of com.github.inercia.k3x
Cache hit for intltool, skipping build
Cache hit for dbus-glib, skipping build
Cache hit for libdbusmenu, skipping build
Cache hit for libindicator, skipping build
Cache hit for libappindicator, skipping build
Cache hit for kubectl, skipping build
Cache miss, checking out last cache hit
========================================================================
Building module python3-xcffib in /home/rarnaud/Code/k3x/.flatpak-builder/build/python3-xcffib-9
========================================================================
Running: pip3 install --exists-action=i --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} "xcffib"
Looking in links: file:///run/build/python3-xcffib
Collecting xcffib
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3iimqez3/xcffib/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3iimqez3/xcffib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: /tmp/pip-install-3iimqez3/xcffib/
    Complete output (25 lines):
    Download error on https://pypi.org/simple/cffi/: [Errno -3] Temporary failure in name resolution -- Some packages may not be found!
    Couldn't find index page for 'cffi' (maybe misspelled?)
    Download error on https://pypi.org/simple/: [Errno -3] Temporary failure in name resolution -- Some packages may not be found!
    No local packages or working download links found for cffi>=1.1.0
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-3iimqez3/xcffib/setup.py", line 90, in <module>
        **cffi_args
      File "/usr/lib/python3.7/site-packages/setuptools/__init__.py", line 144, in setup
        _install_setup_requires(attrs)
      File "/usr/lib/python3.7/site-packages/setuptools/__init__.py", line 139, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/usr/lib/python3.7/site-packages/setuptools/dist.py", line 719, in fetch_build_eggs
        replace_conflicting=True,
      File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 782, in resolve
        replace_conflicting=replace_conflicting
      File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1065, in best_match
        return self.obtain(req, installer)
      File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1077, in obtain
        return installer(requirement)
      File "/usr/lib/python3.7/site-packages/setuptools/dist.py", line 786, in fetch_build_egg
        return cmd.easy_install(req)
      File "/usr/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 673, in easy_install
        raise DistutilsError(msg)
    distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('cffi>=1.1.0')
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Error: module python3-xcffib: Child process exited with code 1
make: *** [Makefile:142: /home/rarnaud/Code/k3x/.flatpak-builder/build/staging/build.ninja] Error 1

I'm not sure how to fix that...
That's preventing me to test and submit a PR for issue #24 (I need to add paramiko to requirements.txt, regenerate the dependencies and validate with a build and run).

@inercia
Copy link
Owner

inercia commented Dec 27, 2020

Thanks for pointing out this problem @Roming22. I get the same error after upgrading pypi-dependencies.json after upgrading flatpak-pip-generator. When using the old flatpak-pip-generator, I can run make generate and make build and everything works fine. I guess there must be something special about the version of flatpak-pip-generator I was using. I'm still investigating...

@Roming22
Copy link
Contributor Author

Do you have any info on the version you are using? An md5 hash, a date the file was created? That might help me find the proper version and submit a change to Makefile.

@Roming22
Copy link
Contributor Author

@inercia Any thing I can do to help move this issue forward? I'd love to be able to build k3x locally and submit fixes/features.

@Roming22
Copy link
Contributor Author

Roming22 commented Feb 6, 2021

I cannot reproduce with the latest version of the repository. Using a brand new VM, a clean checkout followed by make deps && make build && make run launches the application as expected.
@inercia it looks like the issue can be closed, but I'll let you do it in case there was still something you wanted to do about it.

@Roming22
Copy link
Contributor Author

Roming22 commented Feb 7, 2021

Ignore my previous comment, I forgot to try and regenerate the dependencies, which is now failing with

Traceback (most recent call last):
  File "/home/rarnaud/Code/k3x/build-aux/flatpak-pip-generator", line 226, in <module>
    url = get_tar_package_url_pypi(name, version)
  File "/home/rarnaud/Code/k3x/build-aux/flatpak-pip-generator", line 63, in get_tar_package_url_pypi
    raise Exception(err)
Exception: Failed to get system_hotkey-1.0.3 source from https://pypi.org/pypi/system_hotkey/1.0.3/json
make: *** [Makefile:244: generate] Error 1

@inercia
Copy link
Owner

inercia commented Feb 7, 2021

@Roming22, that's strange, that URL seems to be working fine:

$ curl https://pypi.org/pypi/system_hotkey/1.0.3/json
{"info":{"author":"timothy eichler","author_email":"[email protected]","bugtrack_url":null,"classifiers":["Development Status :: 4 - Beta","Intended Audience :: Developers","License :: OSI Approved :: BSD License","Operating System :: OS Independent","Programming Language :: Python :: 3"],"description":"System Hotkey...

Could that be a connectivity problem?

@Roming22
Copy link
Contributor Author

Roming22 commented Feb 7, 2021

@inercia The issue is that flatpak-pip-generator removed support for any.whl extensions, which is the extension used by system-hotkey.

system-hotkey does not seem to be very active. I would suggest you migrate to the keyboard package which seems to have a larger following, be supported, and uses the extensions supported by flatpak-pip-generator.

@Roming22
Copy link
Contributor Author

@inercia Can you confirm that on your side the dependency generation fails if you add a new dependency to requirements.txt (e.g. paramiko)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants