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

Setup not including top folder files #10

Merged
merged 2 commits into from
Mar 13, 2021

Conversation

manoelmarques
Copy link
Contributor

Summary

Wheel file was not including the top files.

Details and comments

@manoelmarques manoelmarques added the type: bug 🐞 Something isn't working label Mar 13, 2021
@manoelmarques manoelmarques self-assigned this Mar 13, 2021
@mtreinish
Copy link
Collaborator

The issue here and in the similar prs is the use of find_namespace_packages, that should only be used in a namespace package (like aqua) where the root of the namespaceis in another package. You should be using find_packages in packages that are self contained like this.

@manoelmarques
Copy link
Contributor Author

manoelmarques commented Mar 13, 2021

@mtreinish The issue I was getting is that the files at the top folder were not being included when creating a wheel file or using a zipped from git to install. The sub-folders with files were included correctly.

I thought according to: "...Full support for PEP 420 via find_namespace_packages(), which is also backwards compatible to the existing find_packages() for Python >= 3.3." at https://setuptools.readthedocs.io/en/latest/setuptools.html

So I thought find_namespace_packages was the way to go forwards.

Also, I tested both find_packages and find_namespace_packages and found that for both to include top files and internal folders I still need to add : 'qiskit_machine_learning' regardless of what function I use. Just changing the function to find_packages without the additional parameter didn't fix it. The solutions were:

packages=setuptools.find_packages(include=['qiskit_machine_learning','qiskit_machine_learning.*']),

or

packages=setuptools.find_namespace_packages(include=['qiskit_machine_learning', 'qiskit_machine_learning.*']),

But I changed to find_packages.

@manoelmarques manoelmarques merged commit c1b224e into qiskit-community:master Mar 13, 2021
@manoelmarques manoelmarques deleted the setup branch March 13, 2021 14:30
gentinettagian pushed a commit to gentinettagian/qiskit-machine-learning that referenced this pull request Dec 14, 2021
* Setup not including top folder files

* change to find_packages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐞 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants