Skip to content

Modernize: use pyproject.toml for more things, add pre-commit; remove versioneer #67

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

Merged
merged 3 commits into from
Feb 10, 2023

Conversation

eriknw
Copy link
Member

@eriknw eriknw commented Feb 9, 2023

  • Move metadata and config to pyproject.toml (and flake8 config to .flake8)
  • Use setuptools-git-versioning instead of versioneer.py
  • Add .pre-commit-config.yaml for git pre-commit hooks
  • Add GitHub Action to run pre-commit hooks to check linting

Addresses some of #65, but we're still using setuptools. Hopefully I didn't screw anything up.

CC @alugowski, this may help with the version issues in #66. How do you build sdist and wheels? build --sdist and build --wheel or similar?

… versioneer

- Move metadata and config to `pyproject.toml` (and flake8 config to `.flake8`)
- Use `setuptools-git-versioning` instead of `versioneer.py`
- Add `.pre-commit-config.yaml` for git pre-commit hooks
- Add GitHub Action to run pre-commit hooks to check linting
@alugowski
Copy link
Collaborator

Oh nice. I'm happy to rebase the other PR on this when you're happy with it.

Yeah, the sdist is built with build --sdist:
https://github.com/alugowski/python-suitesparse-graphblas/blob/28c3b04e336ec44166c983ad5aadc82cfe191c77/.github/workflows/wheels.yml#L22

It's probably broken in the same way as the existing one: needs GraphBLAS but doesn't include it.

@eriknw
Copy link
Member Author

eriknw commented Feb 10, 2023

Oh nice. I'm happy to rebase the other PR on this when you're happy with it.

Cool. I think I'm happy with it. Won't know for certain unless it works with your PR 🤣 . Shall I go ahead and merge?

I built this PR on conda-forge, and everything worked except the version (which is expected--it should work in normal situations).

[sdist is] probably broken in the same way as the existing one: needs GraphBLAS but doesn't include it.

sdists are meant for redistributors. It's not supposed to have GraphBLAS included. Even a clever individual should be able to install the sdist using their local installation of GraphBLAS--probably just need to set some environment variables. We test sdist installs in python-graphblas CI.

@eriknw eriknw merged commit 97fc4f9 into GraphBLAS:main Feb 10, 2023
@alugowski
Copy link
Collaborator

Great!

I'll work on the cibuildwheel PR soon.

The linter change is nice. It still provides questionable demands, but at least now they come quickly instead of at the end of a long build :)

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