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

Trying to submit package to conda-forge #105

Closed
wants to merge 4 commits into from

Conversation

camaramm
Copy link

@camaramm camaramm commented Sep 6, 2022

Hello @polsys ,
I'm trying to submit your package ennemi to conda-forge, as of PR https://github.com/conda-forge/staged-recipes/pull/20314/checks.
The build process has failed and I've only found a clue of the problem in the raw log, which states FileNotFoundError: [Errno 2] No such file or directory: '/home/conda/staged-recipes/build_artifacts/ennemi_1662399536726/work/DESCRIPTION.md'.
So that the motivation for this PR in ennemi.
Feel free to contact.

@polsys polsys added the maintenance Internal changes to code or infrastructure. label Sep 6, 2022
@polsys polsys added this to the v1.2.1 milestone Sep 6, 2022
@polsys
Copy link
Owner

polsys commented Sep 6, 2022

Hello @camaramm, and thanks for your effort! I'm travelling this week, but I was planning to do a small 1.2.1 release next week (mainly to check how type annotations interact with latest NumPy). I can include the necessary changes in that version to unblock you.

I'm not an expert on conda-forge, but I think ennemi should only need a change to the package-data line in setup.py. In particular, the conda-forge script should probably not be included in ennemi repo. If you update the PR, I can test the changes once I'm back at office.

setup.py Outdated Show resolved Hide resolved
@polsys
Copy link
Owner

polsys commented Sep 6, 2022

Don't worry about the build errors related to Run type checker step. The type annotations of ennemi and NumPy are still in flux, they break on every NumPy update 😄 Annoyingly enough the Try building the package step comes only after type checking... I will reorder those.

@camaramm
Copy link
Author

camaramm commented Sep 6, 2022

Hello @camaramm, and thanks for your effort! I'm travelling this week, but I was planning to do a small 1.2.1 release next week (mainly to check how type annotations interact with latest NumPy). I can include the necessary changes in that version to unblock you.

Sure, take your time.

I'm not an expert on conda-forge, but I think ennemi should only need a change to the package-data line in setup.py.

I'm not an expert either. But it is nice to know your thought, it confirms one of my hypothesis for the build error in conda-forge.

In particular, the conda-forge script should probably not be included in ennemi repo. If you update the PR, I can test the changes once I'm back at office.

Yes, you're right. I've included as a reference. I'll update to remove it.

@polsys
Copy link
Owner

polsys commented Sep 12, 2022

Hi @camaramm! I now had the time to investigate this properly. I agree with your analysis of the build failure:

  • The setup.py script loads PyPI description text from a DESCRIPTION.md file
  • This file is not included in the PyPI source distribution: it includes only
    • source code files inside ennemi folder (specified on packages line)
    • LICENSE and README files (built-in regex)

I tried locally building the distribution with your change to package_data, and it seems to have no effect. From my limited understanding, it seems hard to include root level files; the file would need to be moved to a subfolder.

However, there might be an easier way to fix this issue. If you get the source tarball from GitHub and not PyPI, the file should be correctly included. See https://github.com/conda-forge/staged-recipes/blob/main/recipes/example/meta.yaml#L17.

Can you try to update the conda-forge PR to use GitHub source instead? If that works, then no ennemi changes are necessary. I'll still push a 1.2.1 update soon, so:

  • If the conda-forge change works, I'd suggest holding off merging it until I can push 1.2.1, so that you don't need to do an update straight away
  • If it does not work, then we can still do any necessary ennemi fixes.

@polsys
Copy link
Owner

polsys commented Sep 13, 2022

I noticed that you got the script working in conda-forge/staged-recipes#20405, so I went and published the 1.2.1 version. I'll close this PR now, but feel free to be in touch. Thank you for your contribution in making ennemi more widely available, I really appreciate it! 😃

@polsys polsys closed this Sep 13, 2022
@camaramm
Copy link
Author

Hi @polsys .

Thanks for your attention and effort! Yes, I have tried using the GitHub source, as suggested, and now all checks have passed in the submission process. Still waiting the conclusion, but it seems it is all right.
We that should thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Internal changes to code or infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants