question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Installation of plum-dispath as a requirement via setup.py

See original GitHub issue

We are having trouble to use plum-dispatch as a dependency in my own project. We include plum-dispatch as a requirement in our setup.py, but unfortunately the automatic installation fails with

Searching for plum-dispatch
Reading https://pypi.org/simple/plum-dispatch/
Downloading https://files.pythonhosted.org/packages/aa/ce/3467306a9bd3e3e7fe4450f87f283e9f997f0646a410d716296db9bfa3ad/plum-dispatch-1.0.0.tar.gz#sha256=766da66a93d0f00911777175dc7a43235ee3f18ead34c73977e710f732a918fd
Best match: plum-dispatch 1.0.0
Processing plum-dispatch-1.0.0.tar.gz
Writing /tmp/easy_install-s90fi7cu/plum-dispatch-1.0.0/setup.cfg
Running plum-dispatch-1.0.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-s90fi7cu/plum-dispatch-1.0.0/egg-dist-tmp-9fh6ov4j
warning: the 'license_file' option is deprecated, use 'license_files' instead
error: Setup script exited with error: unknown file type '.py' (from 'plum/function.py')
Error: Process completed with exit code 1.

I am no expert with setuptools, but it seems to me as if license_file instead of license_files in the setup.cfg is causing issues.

Installing plum-dispatch before hand via pip pip install plum-dispatch is a work around without problems though.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
PhilipVinccommented, May 13, 2021

I don’t think it can be that…

license_file has been deprecated in April in favour of license_files (see https://github.com/pypa/setuptools/issues/2620 ). That’s just a deprecation warning.

The problem is with

> error: Setup script exited with error: unknown file type '.py' (from 'plum/function.py')

I think it’s not picking up the Cython dependency correctly.

EDIT: I am 99% positive about that. I had the same error when submitting the conda-forge recipe until I realised that plum depends on Cython, but that is not a declared dependency.

0reactions
wesselbcommented, May 19, 2021

Glad to hear you found a satisfactory solution!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Manually Install Python Packages - ActiveState
Complete package build requirements for a setup.py based installation are outlined by PyPA (Python Packaging Authority) in 'Sample Project'.
Read more >
A Practical Guide to Using Setup.py - GoDataDriven
A much better way is to install your package using a setup.py and pip , ... You may specify requirements without a version...
Read more >
python - requirements.txt vs setup.py - Stack Overflow
When pip -r requirements.txt is run on this file, pip will install your dependencies via the list in ./setup.py . The editable option...
Read more >
Installing Python Modules (Legacy version) — Python 3.11.1 ...
Note. This guide only covers the basic tools for building and distributing extensions that are provided as part of this version of Python....
Read more >
Install Python packages on the research supercomputers at IU
If you know several researchers are interested in using a Python package that is not already installed, you can request to have it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found