Skip to content

Commit

Permalink
Enhance buildsys
Browse files Browse the repository at this point in the history
 - Remove setup.py
 - Use uv build in fabfile
 - move info to pyproject.toml
  • Loading branch information
glibersat committed Feb 13, 2025
1 parent 01827e3 commit 303d84e
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 31 deletions.
5 changes: 2 additions & 3 deletions fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import json
import os
from distutils.core import run_setup

import requests
from dotenv import load_dotenv
Expand All @@ -20,7 +19,7 @@

load_dotenv()

PACKAGE = f"recoco-{recoco.VERSION}.tar.gz"
PACKAGE = f"recoco-{recoco.__version__}.tar.gz"

# TODO make target folder being
# - prod if branch == main,
Expand Down Expand Up @@ -62,8 +61,8 @@ def deploy(cnx, site=None):
return

local("cd recoco/frontend && yarn build")
local("uv build")

run_setup("setup.py", script_args=["sdist"])
cnx.put(
f"./dist/{PACKAGE}",
remote=f"./recoco-{site}/dist/{PACKAGE}",
Expand Down
24 changes: 23 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
[project]
name = "recoco"
version = "6.2.2"
dynamic = ["version"]

authors = [{name = "Recoco Dev Team"}]
maintainers = [
{name = "Guillaume Libersat", email = "[email protected]"}
]
license = {name = "AGPL-v3", file="LICENSE"}

description = "Recommandations Collaboratives"
readme = "README.md"
requires-python = ">=3.11"
Expand Down Expand Up @@ -65,6 +72,21 @@ dependencies = [
"wagtail==6.2.2",
]

[project.urls]
Homepage = "https://recommandations-collaboratives.beta.gouv.fr/"
Documentation = "https://reco-co.gitbook.io/"
Repository = "https://github.com/betagouv/recommandations-collaboratives/"

[tool.setuptools]
packages = ["recoco"]

[tool.setuptools.dynamic]
version = {attr = "recoco.__version__"}

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.djlint]
# ignore = "W013"
extension = "html"
Expand Down
2 changes: 1 addition & 1 deletion recoco/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "2.61.2"
__version__ = "2.62.1"
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This file was autogenerated by uv via the following command:
# uv export --frozen --output-file=requirements.txt
-e .
alabaster==1.0.0 \
--hash=sha256:c00dca57bca26fa62a6d7d0a9fcce65f3e026e9bfe33e9c538fd3fbb2144fd9e \
--hash=sha256:fc6786402dc3fcb2de3cabd5fe455a2db534b371124f1f21de8731783dec828b
Expand Down
24 changes: 0 additions & 24 deletions setup.py

This file was deleted.

3 changes: 1 addition & 2 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 303d84e

Please sign in to comment.