push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
{
lib,
callPackage,
buildPythonPackage,
fetchPypi,
pythonOlder,
replaceVars,
hatchling,
}:
buildPythonPackage rec {
pname = "attrs";
version = "25.3.0";
disabled = pythonOlder "3.7";
format = "pyproject";
src = fetchPypi {
inherit pname version;
hash = "sha256-ddfO/H+1dnR7LIG0RC1NShzgkAlzUnwBHRAw/Tv0rxs=";
};
patches = [
(replaceVars ./remove-hatch-plugins.patch {
# hatch-vcs and hatch-fancy-pypi-readme depend on pytest, which depends on attrs
inherit version;
})
];
nativeBuildInputs = [ hatchling ];
outputs = [
"out"
"testout"
];
postInstall = ''
# Install tests as the tests output.
mkdir $testout
cp -R conftest.py tests $testout
'';
pythonImportsCheck = [ "attr" ];
# pytest depends on attrs, so we can't do this out-of-the-box.
# Instead, we do this as a passthru.tests test.
doCheck = false;
passthru.tests = {
pytest = callPackage ./tests.nix { };
};
meta = with lib; {
description = "Python attributes without boilerplate";
homepage = "https://github.com/python-attrs/attrs";
changelog = "https://github.com/python-attrs/attrs/releases/tag/${version}";
license = licenses.mit;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,77 @@
diff --git a/pyproject.toml b/pyproject.toml
index 0b59809..8811148 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: MIT
[build-system]
-requires = ["hatchling", "hatch-vcs", "hatch-fancy-pypi-readme>=23.2.0"]
+requires = ["hatchling"]
build-backend = "hatchling.build"
@@ -26,7 +26,8 @@ classifiers = [
"Typing :: Typed",
]
dependencies = []
-dynamic = ["version", "readme"]
+dynamic = ["readme"]
+version = "@version@"
[project.optional-dependencies]
tests-mypy = [
@@ -72,53 +73,9 @@ Funding = "https://github.com/sponsors/hynek"
Tidelift = "https://tidelift.com/subscription/pkg/pypi-attrs?utm_source=pypi-attrs&utm_medium=pypi"
-[tool.hatch.version]
-source = "vcs"
-raw-options = { local_scheme = "no-local-version" }
-
[tool.hatch.build.targets.wheel]
packages = ["src/attr", "src/attrs"]
-[tool.hatch.metadata.hooks.fancy-pypi-readme]
-content-type = "text/markdown"
-
-# PyPI doesn't support the <picture> tag.
-[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
-text = """<p align="center">
- <a href="https://www.attrs.org/">
- <img src="https://raw.githubusercontent.com/python-attrs/attrs/main/docs/_static/attrs_logo.svg" width="35%" alt="attrs" />
- </a>
-</p>
-"""
-
-[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
-path = "README.md"
-start-after = "<!-- teaser-begin -->"
-
-[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
-text = """
-
-## Release Information
-
-"""
-
-[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
-path = "CHANGELOG.md"
-pattern = "\n(###.+?\n)## "
-
-[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
-text = """
-
----
-
-[Full changelog →](https://www.attrs.org/en/stable/changelog.html)
-"""
-
-# Point sponsor image URLs to versions.
-[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
-pattern = 'docs\/_static\/sponsors'
-replacement = 'https://www.attrs.org/en/$HFPR_VERSION/_static/sponsors'
-
[[tool.sponcon.sponsors]]
title = "Variomedia AG"
url = "https://www.variomedia.de/"

View File

@@ -0,0 +1,23 @@
{
buildPythonPackage,
pytestCheckHook,
attrs,
hypothesis,
}:
buildPythonPackage {
pname = "attrs-tests";
inherit (attrs) version;
format = "other";
srcs = attrs.testout;
dontBuild = true;
dontInstall = true;
nativeCheckInputs = [
attrs
hypothesis
pytestCheckHook
];
}