-
Notifications
You must be signed in to change notification settings - Fork 655
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
PEP-517 and PEP-518 support (add pyproject.toml) #274
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! Thanks!
I wonder, will the current script (https://github.com/nmslib/hnswlib/blob/develop/Makefile) work for publishing pip packages?
Yes, in this PR, the project will still publish an "sdist" (source distribution), not a "wheel" (binary distribution). However, now the "sdist" will be built correctly by consumers of this package without having to manually install Compare what happens with
This message no longer appears if you try the install into a clean virtualenv of this branch. You will see the
|
Got it! Thanks! I'll check it and merge. @dyashuni can you please also check? |
Sure, I'll check it. |
Currently in the travis we build hnswlib twice. When we run |
Yes. I didn't really want to mention it, but I've made some changes to fix this in the latest commit. See: 467c98f Essentially, this project can do with a bit of refactoring in the way that it is packaged and the Python coding conventions to make it follow best-practices a bit. I can raise a few more PRs to propose some changes in future if I find some time and if the project is interested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Good changes, thank you very much @groodt! |
One thing to mention, now in Makefile What is the best way to handle it @groodt ? Add an additional target in Makefile that will allow a user to install all required packages to build sdist, for example, |
Ah, you are correct. My apologies. I should have checked. Yes, these new PEP standards do encourage more publishing of wheels than sdist. We don't need to make this change now (or ever). At least this inconvenience is only for the package uploader to PyPI, which is presumably a limited number of people. There is an official PEP517 builder that supports both sdist and wheels, see: https://github.com/pypa/build I'll make this change to the Makefile shortly. |
It fixes the issue, thank you @groodt ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@groodt Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Do you plan add something to this PR?
Nope. I would be happy for it to be merged.
…On Sun, 17 Jan 2021 at 14:35, Yury Malkov ***@***.***> wrote:
***@***.**** approved this pull request.
Looks great! Do you plan add something to this PR?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#274 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACT254PT5SM6CVG4K3C3BLS2JLJRANCNFSM4V4JWWIA>
.
|
Cool! Thank you so much! |
Thanks for the reviews @yurymalkov @dyashuni Is there likely to be a new release to PyPI anytime soon or are there more features waiting to land on |
Yes, we plan to release soon, there are significant changes. |
@yurymalkov No rush, just checking in, but any news on the next release date? |
@groodt |
Awesome! Thanks again! |
Closes: #269 #177
hnswlib does not use the recommended packaging approach for pybind11.
https://pybind11.readthedocs.io/en/stable/compiling.html#setup-helpers-pep518
The pyproject.toml file can specify the requirements necessary for the build backend (setuptools in this case) that are installed before the actual build takes place.
This should also make it easier to start packaging wheels etc if this project moves to a more modern packaging approach.