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

📦 Get rid of pbr in packaging #76

Merged
merged 2 commits into from
Jan 8, 2025

Conversation

msabramo
Copy link
Owner

@msabramo msabramo commented Jan 5, 2025

No description provided.

@webknjaz
Copy link
Collaborator

webknjaz commented Jan 5, 2025

Replace calling setup.py install with pip install . as a quick fix. You'll also want to bump the action versions as they are way outdated too.

FWIW, I can fix the CI if you want. I was going to rework the workflow anyway.

setup.py Outdated
@@ -3,7 +3,7 @@
from setuptools import setup

setup(
setup_requires=['pbr'],
setup_requires=['pbr', 'setuptools'],
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is deprecated and must be in pyproject.toml's [build-system].

Copy link
Owner Author

Choose a reason for hiding this comment

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

Done.

@msabramo msabramo force-pushed the update-gh-action-python-versions branch from 68cf0dc to 4467030 Compare January 5, 2025 22:01
pyproject.toml Outdated
]

[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

setuptools-scm won't work like this. You have to opt in by adding [tool.setuptools_scm] and allowing the version to be dynamic.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yeah I wanted to turn on the dynamic stuff too. Thanks for doing it!

pyproject.toml Outdated
version = "0.3.0"
description = "Use requests to talk HTTP via a UNIX domain socket"
readme = "README.md"
requires-python = ">=3.8"
Copy link
Collaborator

Choose a reason for hiding this comment

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

A lot of people have already dropped 3.8 because it's EOL: https://endoflife.date/python

Copy link
Owner Author

Choose a reason for hiding this comment

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

OK I went ahead and dropped it too in d3cbf96.

pyproject.toml Outdated Show resolved Hide resolved
@webknjaz
Copy link
Collaborator

webknjaz commented Jan 5, 2025

Also, the support for Git archives versioning needs to be enabled with two more files: https://setuptools-scm.rtfd.io/en/latest/usage/#git-archives

pyproject.toml Outdated Show resolved Hide resolved
@msabramo msabramo changed the title Update GH Action Python versions Update Python versions and fix GH Action tests Jan 6, 2025
@msabramo msabramo marked this pull request as ready for review January 6, 2025 02:32
@msabramo msabramo requested a review from webknjaz January 6, 2025 02:32
@mupuf
Copy link
Collaborator

mupuf commented Jan 6, 2025

Aside from the messy history, I think this is looking good. Thanks :)

@msabramo msabramo requested review from crgwbr and mupuf January 6, 2025 18:45
"version",
]

[[project.authors]]
Copy link
Collaborator

Choose a reason for hiding this comment

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

FYI, there's also [[project.maintainers]] that can be filled with multiple entries as well.

[project]
name = "requests-unixsocket"
description = "Use requests to talk HTTP via a UNIX domain socket"
requires-python = ">= 3.9"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd rather keep the entries ordered in this section (mostly).

# Install pytest (you can use some other testing utility)
- name: Install deps
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r test-requirements.txt
# Run the tests. I'm using pytest and the file is in the tests directory.
# Install the package using the setup.py
Copy link
Collaborator

Choose a reason for hiding this comment

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

Well, that's just not true anymore. First of all, it's used for building and not installing (pip install would just unzip the wheel for installing). And second, it's being deleted 🤷‍♂️

@webknjaz
Copy link
Collaborator

webknjaz commented Jan 6, 2025

Aside from the messy history, I think this is looking good. Thanks :)

I think, I'd split out a few things and clean the commits unless somebody wants to go with merging it as is...

@msabramo
Copy link
Owner Author

msabramo commented Jan 6, 2025

Aside from the messy history, I think this is looking good. Thanks :)

I think, I'd split out a few things and clean the commits unless somebody wants to go with merging it as is...

Go ahead and clean up as you see fit! Thanks!

@webknjaz webknjaz self-assigned this Jan 7, 2025
Copy link
Collaborator

@mupuf mupuf left a comment

Choose a reason for hiding this comment

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

The code looks good-enough to me. So if @webknjaz is going to rework the history I'm good :)

@webknjaz webknjaz marked this pull request as draft January 8, 2025 02:33
@webknjaz
Copy link
Collaborator

webknjaz commented Jan 8, 2025

For transparency, I decomposed a part of this into several branches/PRs (#77, #78, #79) and one combo (#80). Will rebase this one on top shortly.

@webknjaz webknjaz force-pushed the update-gh-action-python-versions branch from d3cbf96 to 0450eab Compare January 8, 2025 03:02
msabramo and others added 2 commits January 8, 2025 04:10
This patch additionally enables support for `git archive`s [[1]].

[1]: https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives

Co-Authored-By: Sviatoslav Sydorenko <[email protected]>
@webknjaz webknjaz marked this pull request as ready for review January 8, 2025 03:12
@webknjaz webknjaz force-pushed the update-gh-action-python-versions branch from 0450eab to 1ffca8e Compare January 8, 2025 03:12
@webknjaz webknjaz changed the title Update Python versions and fix GH Action tests Get rid of pbr in packaging Jan 8, 2025
@webknjaz webknjaz changed the title Get rid of pbr in packaging 📦 Get rid of pbr in packaging Jan 8, 2025
@webknjaz webknjaz merged commit 5a196ff into master Jan 8, 2025
10 checks passed
@webknjaz
Copy link
Collaborator

webknjaz commented Jan 8, 2025

Looks like one of the tests is unreliable, by the way: https://github.com/msabramo/requests-unixsocket/actions/runs/12663395181/job/35289911221.

@webknjaz
Copy link
Collaborator

webknjaz commented Jan 8, 2025

Filed #81 for the release work.

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.

4 participants