Skip to content

add source distribution step to workflow#51

Merged
fhs merged 6 commits intofhs:masterfrom
abrammer:add_sdist_to_packaing_workflow
May 19, 2021
Merged

add source distribution step to workflow#51
fhs merged 6 commits intofhs:masterfrom
abrammer:add_sdist_to_packaing_workflow

Conversation

@abrammer
Copy link
Contributor

@abrammer abrammer commented May 17, 2021

Add source distribution to wheelhouse directory for artifact and pypi upload. Follow on from #49.

Note, I think this will work, but don't have experience actually doing this specific step for upload to pypi. Might be worth pushing an alpha release branch just to test this whole workflow. A branch with the version 0.10.3a1 or similar pre-release version number with a tag should get uploaded to test.pypi without doing anything to master or real pypi.

@abrammer abrammer mentioned this pull request May 17, 2021
4 tasks
@fhs
Copy link
Owner

fhs commented May 18, 2021

@abrammer
Copy link
Contributor Author

Ahh, not the error I expected but makes sense. Added the numpy dep and bumped the setup.py version so the upload doesn't collide with any 10.2 versions already uploaded. Ran a test workflow in my repo and other than an obvious pypi authentication issue, looks like everything should be right now. Both wheels and the tar.gz were ready to be uploaded.

@fhs
Copy link
Owner

fhs commented May 18, 2021

@abrammer The alpha seems to be working now. I had to install numpy manually in a fresh virtualenv before I could import pyhdf.SD. I wonder why numpy isn't being installed automatically by pip when I install pyhdf. There is a pyproject.toml which lists build dependencies. Do we need something else for wheels? requirements.txt?

@abrammer
Copy link
Contributor Author

abrammer commented May 18, 2021

Awesome, yeah I see the wheels on test pypi and a pip install works. For the numpy issue, I think I know the answer. the pyproject.toml defines the build environment but installing through a wheel isn't a build anymore. The install can be defined in setup.cfg d78cff8, those extra lines should solve that now.

I think in both those files you can point at a requirements.txt but given it's a single dependency, repeating it once is probably the easier option here.

Copy link
Owner

@fhs fhs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, with alpha3, it tries to build numpy because test.pypi.org doesn't have the binaries. The build fails for me probably because the numpy version on test.pypi.org is really old.

I think it'll work once I push to the main pypi.org site. Great work!

@fhs fhs merged commit 7a0c338 into fhs:master May 19, 2021
@abrammer
Copy link
Contributor Author

abrammer commented May 19, 2021

Awesome, yeah would think the same about it pulling from the same pypi url. Just make sure to update the setup.py version on the "release" commit. The wheels and tar file are named based on that version not the git tag. But I think that's the same as it would have been for your previous releases.

You already did that. Nice. fingers crossed.

@fhs
Copy link
Owner

fhs commented May 19, 2021

It worked. 🎉

@abrammer abrammer deleted the add_sdist_to_packaing_workflow branch March 24, 2023 15:36
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

Successfully merging this pull request may close these issues.

2 participants