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

release fails since build dependencies aren't installed while asking for the version #254

Closed
yarikoptic opened this issue Jan 16, 2024 · 2 comments · Fixed by #259
Closed

Comments

@yarikoptic
Copy link
Member

we are using

      - name: Prepare release
        uses: datalad/release-action/release@master
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          pypi-token: ${{ secrets.PYPI_TOKEN }}
          pre-tag: |
            pkg="$(python setup.py --name)"
            printf '__version__ = "%s"\n' "$new_version" > "$pkg"/version.py
            git commit -m "Update __version__ to $new_version" "$pkg"/version.py

but now that step fails with

Run pkg="$(python setup.py --name)"
Traceback (most recent call last):
  File "/home/runner/work/datalad-container/datalad-container/setup.py", line 3, in <module>
    from setuptools import setup
ModuleNotFoundError: No module named 'setuptools'

@jwodder - do you have an immediate recipe for the remedy?

should we just pip install . in pre-tag before running that pkg= ? but that would install all unnecessary stuff... we could just pip install setuptools but that feels ad-hoc

@jwodder
Copy link
Member

jwodder commented Jan 17, 2024

@yarikoptic

  • Why query pkg in this way instead of just writing "datalad_container"?
  • As part of the move towards pyproject.toml-based builds, invoking python setup.py <anything> is now deprecated, and setuptools is no longer bundled with Python (hence the error you're seeing).

should we just pip install . in pre-tag before running that pkg= ?

I fail to see how doing that would make python setup.py --name succeed.

@yarikoptic
Copy link
Member Author

@yarikoptic

  • Why query pkg in this way instead of just writing "datalad_container"?

I guess that in eeea9db you tried to use some generic pattern so we could use s.across various packages. but yeah -- could be hardcoded I guess.

I see. good. I guess we could follow up my dirty fixes with hardcoding the name there and thus simplifying it all and that would close this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants