Skip to content

Commit 7d2f28a

Browse files
authored
Use uv to build (#41)
1 parent 5bdfabe commit 7d2f28a

File tree

7 files changed

+560
-41
lines changed

7 files changed

+560
-41
lines changed

.github/workflows/ci.yml

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,41 @@ name: CI
22

33
on:
44
push:
5-
branches:
6-
- master
7-
pull_request:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
88

99
jobs:
1010
build:
1111
runs-on: ubuntu-24.04
1212
strategy:
1313
matrix:
1414
python-version: ["3.9", "3.10", "3.11"]
15-
1615
steps:
17-
- uses: actions/checkout@v3
18-
- name: Install xrandr
19-
run: sudo apt-get install -y x11-xserver-utils
20-
- name: Set up Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v4
22-
with:
23-
python-version: ${{ matrix.python-version }}
24-
- name: Install dependencies
25-
run: |
26-
python -m pip install --upgrade pip
27-
pip install -r dev-requirements.txt
28-
- name: Test
29-
run: |
30-
python setup.py test
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0 # Fetch full history for version detection from git tags
19+
20+
- name: Install xrandr
21+
run: sudo apt-get install -y x11-xserver-utils
22+
23+
- name: Install uv
24+
uses: astral-sh/setup-uv@v3
25+
with:
26+
version: "latest"
27+
28+
- name: Set up Python ${{ matrix.python-version }}
29+
run: uv python install ${{ matrix.python-version }}
30+
31+
- name: Install dependencies
32+
run: |
33+
uv sync --dev
34+
35+
- name: Run tests
36+
run: |
37+
uv run pytest
38+
39+
- name: Build package
40+
run: |
41+
uv build
42+

.pyproject.toml.swp

12 KB
Binary file not shown.

dev-requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

pyproject.toml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
[build-system]
2+
requires = ["hatchling", "hatch-vcs"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "randrctl"
7+
description = "Profile based screen manager for X"
8+
authors = [
9+
{ name = "Dmytro Kostiuchenko" }
10+
]
11+
license = { text = "GPL-3.0" }
12+
readme = "README.md"
13+
requires-python = ">=3.7"
14+
classifiers = [
15+
"Development Status :: 4 - Beta",
16+
"Environment :: X11 Applications",
17+
"Intended Audience :: End Users/Desktop",
18+
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
19+
"Operating System :: POSIX :: Linux",
20+
"Programming Language :: Python :: 3",
21+
"Programming Language :: Python :: 3.7",
22+
"Programming Language :: Python :: 3.8",
23+
"Programming Language :: Python :: 3.9",
24+
"Programming Language :: Python :: 3.10",
25+
"Programming Language :: Python :: 3.11",
26+
"Programming Language :: Python :: 3.12",
27+
"Topic :: Desktop Environment",
28+
"Topic :: Utilities"
29+
]
30+
dependencies = [
31+
"argcomplete",
32+
"PyYAML"
33+
]
34+
dynamic = ["version"]
35+
36+
[project.urls]
37+
Homepage = "https://github.com/koiuo/randrctl"
38+
Repository = "https://github.com/koiuo/randrctl"
39+
Issues = "https://github.com/koiuo/randrctl/issues"
40+
41+
[project.scripts]
42+
randrctl = "randrctl.cli:main"
43+
44+
[tool.hatch.version]
45+
source = "vcs"
46+
47+
[tool.hatch.build.targets.wheel]
48+
packages = ["randrctl"]
49+
50+
[dependency-groups]
51+
dev = [
52+
"pytest>=7.4.4",
53+
]

setup.cfg

Lines changed: 0 additions & 17 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

uv.lock

Lines changed: 477 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)