Skip to content

Removing setuptools dependency on build#62

Merged
mikeywaites merged 1 commit intowiremock:masterfrom
jmdacruz:patch-1
May 14, 2023
Merged

Removing setuptools dependency on build#62
mikeywaites merged 1 commit intowiremock:masterfrom
jmdacruz:patch-1

Conversation

@jmdacruz
Copy link
Contributor

@jmdacruz jmdacruz commented May 8, 2023

With the use of modern build tools such as pyproject.toml and poetry, there's no need to use setuptools and setup.py to build the distribution

@oleg-nenashev oleg-nenashev added this to the WireMock Python 3.0 milestone May 9, 2023
@oleg-nenashev oleg-nenashev added the chore Maintenance label May 9, 2023
Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

Should setup.py be removed from the repository entirely then?

@oleg-nenashev
Copy link
Member

FTR it is used in the docs build flow too

image

@jmdacruz
Copy link
Contributor Author

jmdacruz commented May 9, 2023

Good catch! Yes, that should be replaced with 'poetry install'. I'll update the PR

@jmdacruz
Copy link
Contributor Author

jmdacruz commented May 9, 2023

@oleg-nenashev I just updated the PR, but note that the command noted on the screenshot is not what's used to build the docs, but just a reference on how to install wiremock. I replaced that with a poetry install command. The doc builder script uses a different tool that is not referenced on pyproject.toml:

#!/bin/bash

sphinx-build docs html
watchmedo shell-command -R --command 'sphinx-build docs html' ./docs/

@gyoganathan
Copy link

@jmdacruz Can we go ahead and remove the setup.py file now?

@jmdacruz
Copy link
Contributor Author

jmdacruz commented May 9, 2023

@gyoganathan we could, but the file currently doesn't influence the build using "Python -m build --sdist", meaning that the build using poetry does not depend on the "setup.py" file at all.

I'll let the authors decide if we should remove it in this PR

With the use of `pyproject.toml` and tools such as `poetry`, there's no need to use `setuptools` and `setup.py` to build the distribution
@jmdacruz
Copy link
Contributor Author

jmdacruz commented May 10, 2023

@oleg-nenashev I went ahead and removed setup.py, since it's no longer referenced anywhere.

Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

Yes, thanks a lot! We can always restore it from the commit history should be needed

@jmdacruz
Copy link
Contributor Author

@oleg-nenashev got your approval, but I can't merge yet. Do we need some other approval?

@oleg-nenashev oleg-nenashev requested a review from mikeywaites May 13, 2023 15:19
@oleg-nenashev
Copy link
Member

Generally needs @mikeywaites to merge it as a maintainer

@mikeywaites mikeywaites merged commit 2fa4c1a into wiremock:master May 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants