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

Conda recipe #6

Closed
PhilipVinc opened this issue Apr 22, 2021 · 7 comments
Closed

Conda recipe #6

PhilipVinc opened this issue Apr 22, 2021 · 7 comments

Comments

@PhilipVinc
Copy link
Collaborator

Hi again!
Thanks for the release!

As we decided to rely on plum inside of NetKet, and we provide a conda recipe, we would like plum to be available in conda.

I already set up the recipe in this PR to conda-forge conda-forge/staged-recipes#14653 .
If you want to be listed as a maintainer for the codna recipe (typicaly you have nothing to do, as new releases on PyPi will be picked up automatically, unless you change the dependencies in a sensible way), let me know (you should post a comment on the PR saying that 'I aknowledge I will be listed as a maintainer of this recipe').

I'm struggling with one error due to the way you package the cython extension...
What you are doing is that you are compiling function.py as a cython module, right?

@PhilipVinc
Copy link
Collaborator Author

The error I'm seeing is

  reading manifest template 'MANIFEST.in'
  writing manifest file 'plum_dispatch.egg-info/SOURCES.txt'
  running build_ext
  building 'plum.function' extension
  error: unknown file type '.py' (from 'plum/function.py')
  Building wheel for plum-dispatch (PEP 517): finished with status 'error'
  ERROR: Failed building wheel for plum-dispatch
Failed to build plum-dispatch
ERROR: Could not build wheels for plum-dispatch which use PEP 517 and cannot be installed directly
Exception information:
Traceback (most recent call last):
  File "$PREFIX/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 189, in _main
    status = self.run(options, args)
  File "$PREFIX/lib/python3.7/site-packages/pip/_internal/cli/req_command.py", line 178, in wrapper
    return func(self, options, args)
  File "$PREFIX/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 361, in run
    ", ".join(pep517_build_failure_names)
pip._internal.exceptions.InstallationError: Could not build wheels for plum-dispatch which use PEP 517 and cannot be installed directly
Removed build tracker: '/tmp/pip-req-tracker-i_dtb1o7'

@wesselb
Copy link
Member

wesselb commented Apr 22, 2021

It's exciting to hear you've decided to use Plum within your project!

Thanks for setting up the Conda recipe. I've left a comment on the PR there.

Hmm, regarding the error, would you be able to run a

pip install --upgrade pip

before installing Plum? Plum indeed compiles function.py with Cython. This isn't strictly necessary for the package to run, but it does reduce overhead significantly.

@PhilipVinc
Copy link
Collaborator Author

No you cant . The conda build system takes care of this for you...
However you have to specify the dependencies correctly (which sometimes its a pain...)

I think I just forgot to add Cython...

@PhilipVinc
Copy link
Collaborator Author

PhilipVinc commented Apr 22, 2021

By the way, do you actually need such a recent version of Cython, or you just didn't bother setting the lower bound exactly?

Nevermind. 0.29 is not so recent

@PhilipVinc
Copy link
Collaborator Author

PhilipVinc commented Apr 22, 2021

By the way, one minor thing i noticed is that the license file you are packing is called LICENCE.txt, instead of the standard LICENCE.
That's not really an issue, it just means I had to specify the file name, but... yeah. Maybe you'd want to change it so it plays better with other packaging systems in the future.

@wesselb
Copy link
Member

wesselb commented Apr 22, 2021

@PhilipVinc, ah gotcha. After adding Cython, does it now build fine?

By the way (...) other packaging systems in the future.

Thanks for pointing that out! I'll rename the file to LICENCE.

@PhilipVinc
Copy link
Collaborator Author

Yes. The recipe has been merged.
In less than an hour you should see an invitation to the conda-forge organisation and membership of the plum repository there.
A few minutes later you will also be able to do conda install conda-forge::plum-dispatch

The repository is set up to monitor pypi for new releases of plum. Once you upload a new release to pypi he will open a PR to update the recipe automatically. If all is good it will be auto-merged.

Human intervention is only required if something breaks

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