Skip to content

Conversation

elijahr
Copy link
Owner

@elijahr elijahr commented Nov 17, 2024

  • Instead of dynamically generating the header stubs, include them in the repository.
  • Switch from lintball to pre-commit.
  • Add contribution guidelines and notes.

@elijahr elijahr requested a review from touilleMan November 17, 2024 19:29
- Instead of dynamically generating the header stubs, include them in the repository.
- Switch from lintball to pre-commit
- Add contribution guidelines and notes.
@elijahr elijahr force-pushed the refactor-installation branch from e2659d9 to 7d5c414 Compare November 17, 2024 19:34
@elijahr
Copy link
Owner Author

elijahr commented Nov 17, 2024

@touilleMan I migrated the project to using pyproject.toml to make it easier for contributors to install dependencies and run tests.

Part of doing this meant getting rid of the custom setup.py which generated the header stubs. So instead, the stubs are now included in the repository. Since that is a lot of files, I have split the commits so it is easier to review:

  • 5d51b65 - This is the actual changes.
  • 7d5c414 - This is just the stubs.

@touilleMan
Copy link
Collaborator

touilleMan commented Nov 17, 2024

@elijahr have you documented the way those stubs have been generated ?

I think I would be beneficial to have a README in the stubs directory do explain that (or even have a script to automate the re-generation, but I might be overkill).

Also, I guess this doesn't fix the infamous #48 since autopxd still need the C compiler to do the preprocessing of C code, right ?

@elijahr
Copy link
Owner Author

elijahr commented Nov 17, 2024

Good point about adding a note about regenrating the stubs. I generated them with code from the old setup.py script, removed in this PR, but based on your suggestion I have created a regenerate_stubs.py script and added a section to the README about the stubs. See 4699a41.

@touilleMan I don't think this fixes #48, no.

pyproject.toml Outdated
"Programming Language :: C",
"Programming Language :: C++",
]
dependencies = ["Click", "pycparser", "setuptools", "wheel"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we still depend on setuptools ?

I would say this is only the case since we use pkg_resources, however it is considered is deprecated and importlib.resources/importlib.metadata is advised to be used instead.

(This PR is big enough, if you agree with this change we may want to open an issue for now, and solve it later in a separated PR)

Copy link
Owner Author

Choose a reason for hiding this comment

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

It was easy enough to do: ae0fe7a

@elijahr elijahr merged commit 7833fe4 into master Nov 18, 2024
7 checks passed
@elijahr elijahr deleted the refactor-installation branch November 18, 2024 23:58
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