Date: Monday, February 6, 2023 @ 01:51:28
  Author: grawlinson
Revision: 1393750

archrelease: copy trunk to community-any

Added:
  reuse/repos/community-any/PKGBUILD
    (from rev 1393748, reuse/trunk/PKGBUILD)
  reuse/repos/community-any/ftbfs-build.py.patch
    (from rev 1393748, reuse/trunk/ftbfs-build.py.patch)
Deleted:
  reuse/repos/community-any/PKGBUILD
  reuse/repos/community-any/ftbfs-build.py.patch

----------------------+
 PKGBUILD             |  170 +++++++++++++++++------------------
 ftbfs-build.py.patch |  232 ++++++++++++++++++++++++-------------------------
 2 files changed, 199 insertions(+), 203 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD    2023-02-06 01:51:26 UTC (rev 1393749)
+++ PKGBUILD    2023-02-06 01:51:28 UTC (rev 1393750)
@@ -1,87 +0,0 @@
-# Maintainer: George Rawlinson <[email protected]>
-# Contributor: Max Mehl <aur at mehl dot mx>
-# SPDX-FileCopyrightText: 2019 Max Mehl
-# SPDX-License-Identifier: CC0-1.0
-
-pkgname=reuse
-pkgver=1.1.0
-pkgrel=1
-pkgdesc='Helper tool for providing and confirming copyright and licensing 
information'
-arch=('any')
-url='https://reuse.software/'
-license=('GPL3' 'Apache' 'custom:CC0-1.0')
-depends=(
-  'python'
-  'python-debian'
-  'python-license-expression'
-  'python-boolean.py'
-  'python-jinja'
-  'python-binaryornot'
-  'python-setuptools' 
-)
-makedepends=(
-  'git'
-  'python-build'
-  'python-installer'
-  'python-wheel'
-  'python-poetry-core'
-)
-checkdepends=('python-pytest')
-optdepends=(
-  'git: git repository support'
-  'mercurial: mercurial repository support'
-)
-_commit='1cd6ec56c825ba62e097a95b743edde76d4398ca'
-source=(
-  "$pkgname::git+https://github.com/fsfe/reuse-tool#commit=$_commit";
-  'ftbfs-build.py.patch'
-)
-b2sums=('SKIP'
-        
'52794da4f1c871591a0be306388aff4973ca0a90ad43162b8762c8c8c283122943ed8e383e1424307dff8e8112267f02ea6f5c66b28d45f6afb6ec583bd27a0d')
-
-pkgver() {
-  cd "$pkgname"
-
-  git describe --tags | sed 's/^v//'
-}
-
-build() {
-  cd "$pkgname"
-
-  # https://github.com/fsfe/reuse-tool/issues/640
-  # why does this look horrible?
-  # let me count the ways:
-
-  # 1. this creates the locale files, but not the rest of the actual package!
-  python -m build --wheel --no-isolation
-
-  # 2. this removes the problem
-  patch -p1 -i "$srcdir/ftbfs-build.py.patch"
-
-  # 3. this builds the rest of the actual package
-  python -m build --wheel --no-isolation
-}
-
-check() {
-  cd "$pkgname"
-
-  pytest -v
-}
-
-package() {
-  cd "$pkgname"
-
-  python -m installer --destdir="$pkgdir" dist/*.whl
-
-  # NFI what poetry is doing, it's installing stuff to the wrong directory
-  local site_packages=$(python -c "import site; 
print(site.getsitepackages()[0])")
-  pushd "$pkgdir/$site_packages"
-  install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" AUTHORS.rst CHANGELOG.md 
README.md
-  rm -rf AUTHORS.rst CHANGELOG.md README.md
-  popd
-
-  # licenses
-  install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSES/*
-
-  sed -n '/## License/,$ p' README.md > 
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}

Copied: reuse/repos/community-any/PKGBUILD (from rev 1393748, 
reuse/trunk/PKGBUILD)
===================================================================
--- PKGBUILD                            (rev 0)
+++ PKGBUILD    2023-02-06 01:51:28 UTC (rev 1393750)
@@ -0,0 +1,83 @@
+# Maintainer: George Rawlinson <[email protected]>
+# Contributor: Max Mehl <aur at mehl dot mx>
+# SPDX-FileCopyrightText: 2019 Max Mehl
+# SPDX-License-Identifier: CC0-1.0
+
+pkgname=reuse
+pkgver=1.1.1
+pkgrel=1
+pkgdesc='Helper tool for providing and confirming copyright and licensing 
information'
+arch=('any')
+url='https://reuse.software/'
+license=('GPL3' 'Apache' 'custom:CC0-1.0')
+depends=(
+  'python'
+  'python-debian'
+  'python-license-expression'
+  'python-boolean.py'
+  'python-jinja'
+  'python-binaryornot'
+  'python-setuptools' 
+)
+makedepends=(
+  'git'
+  'python-build'
+  'python-installer'
+  'python-wheel'
+  'python-poetry-core'
+)
+checkdepends=('python-pytest')
+optdepends=(
+  'git: git repository support'
+  'mercurial: mercurial repository support'
+)
+_commit='2d6896af04ff3ca020a0637b9699f30019cfd08b'
+source=(
+  "$pkgname::git+https://github.com/fsfe/reuse-tool#commit=$_commit";
+  'ftbfs-build.py.patch'
+)
+b2sums=('SKIP'
+        
'52794da4f1c871591a0be306388aff4973ca0a90ad43162b8762c8c8c283122943ed8e383e1424307dff8e8112267f02ea6f5c66b28d45f6afb6ec583bd27a0d')
+
+pkgver() {
+  cd "$pkgname"
+
+  git describe --tags | sed 's/^v//'
+}
+
+build() {
+  cd "$pkgname"
+
+  # https://github.com/fsfe/reuse-tool/issues/640
+  # why does this look horrible?
+  # let me count the ways:
+
+  # 1. this creates the locale files, but not the rest of the actual package!
+  python -m build --wheel --no-isolation
+
+  # 2. this removes the problem
+  patch -p1 -i "$srcdir/ftbfs-build.py.patch"
+
+  # 3. this builds the rest of the actual package
+  python -m build --wheel --no-isolation
+}
+
+check() {
+  cd "$pkgname"
+
+  pytest -v
+}
+
+package() {
+  cd "$pkgname"
+
+  python -m installer --destdir="$pkgdir" dist/*.whl
+
+  # documentation
+  install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" ./*.{rst,md}
+
+  # licenses
+  install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSES/*
+
+  sed -n '/## License/,$ p' README.md > 
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}

Deleted: ftbfs-build.py.patch
===================================================================
--- ftbfs-build.py.patch        2023-02-06 01:51:26 UTC (rev 1393749)
+++ ftbfs-build.py.patch        2023-02-06 01:51:28 UTC (rev 1393750)
@@ -1,116 +0,0 @@
---- a/build.py
-+++ /dev/null
-@@ -1,103 +0,0 @@
--#!/usr/bin/env python3
--#
--# SPDX-FileCopyrightText: 2017 Free Software Foundation Europe e.V. 
<https://fsfe.org>
--# SPDX-FileCopyrightText: 2022 Carmen Bianca Bakker <[email protected]>
--#
--# SPDX-License-Identifier: GPL-3.0-or-later
--
--"""Script called by poetry. The API used by poetry is unstable, but let's hope
--this stays functional.
--"""
--
--import glob
--import os
--import shutil
--import subprocess
--from pathlib import Path
--from warnings import warn
--
--from setuptools import Distribution
--from setuptools.command.build_py import build_py
--
--# pylint: disable=attribute-defined-outside-init
--
--
--class Build(build_py):
--    """Redefined build."""
--
--    def initialize_options(self):
--        super().initialize_options()
--        self.po_files = None
--        self.msgfmt = None
--        self.mo_outputs = []
--
--    def finalize_options(self):
--        super().finalize_options()
--        self.po_files = glob.glob("po/*.po")
--        for msgfmt in ["msgfmt", "msgfmt.py", "msgfmt3.py"]:
--            self.msgfmt = shutil.which(msgfmt)
--            if self.msgfmt:
--                break
--
--    def run(self):
--        super().run()
--        if self.msgfmt:
--            for po_file in self.po_files:
--                self.announce(f"compiling {po_file}")
--                lang_dir = str(
--                    Path(self.build_lib)
--                    / "reuse/locale"
--                    / Path(po_file).stem
--                    / "LC_MESSAGES"
--                )
--                destination = str(Path(lang_dir) / "reuse.mo")
--                compile_func = lambda msgfmt, in_file, out: subprocess.run(
--                    [msgfmt, in_file, "-o", out],
--                    check=True,
--                )
--
--                self.mkpath(lang_dir)
--                self.make_file(
--                    po_file,
--                    destination,
--                    compile_func,
--                    (self.msgfmt, po_file, destination),
--                )
--                self.mo_outputs.append(destination)
--
--        else:
--            warn("msgfmt is not installed. Translations will not be 
included.")
--
--    def get_outputs(self, include_bytecode=1):
--        return (
--            super().get_outputs(include_bytecode=include_bytecode)
--            + self.mo_outputs
--        )
--
--
--def build():
--    """Main function that runs the compilation."""
--    distribution = Distribution(
--        {
--            "package_dir": {"": "src"},
--        }
--    )
--    cmd = Build(distribution)
--    cmd.inplace = 1
--    cmd.ensure_finalized()
--    cmd.run()
--
--    # Copy into src/. This appears to be the thing that actually does all the
--    # heavy lifting. I'm not sure why I'm bothering with all the
--    # setuptools-specific logic above.
--    #
--    # In summary: Get .mo files from build directory and put them into
--    # src/reuse/locale/{lang}/LC_MESSAGES/reuse.mo.
--    for output in cmd.get_outputs():
--        relative = Path("src") / os.path.relpath(output, cmd.build_lib)
--        relative.parent.mkdir(parents=True, exist_ok=True)
--        shutil.copyfile(output, relative)
--
--
--if __name__ == "__main__":
--    build()
---- a/pyproject.toml
-+++ b/pyproject.toml
-@@ -68,7 +68,6 @@ reuse = 'reuse._main:main'
- 
- [tool.poetry.build]
- generate-setup-file = false
--script = "build.py"
- 
- [build-system]
- requires = ["poetry-core>=1.1.0", "setuptools"]

Copied: reuse/repos/community-any/ftbfs-build.py.patch (from rev 1393748, 
reuse/trunk/ftbfs-build.py.patch)
===================================================================
--- ftbfs-build.py.patch                                (rev 0)
+++ ftbfs-build.py.patch        2023-02-06 01:51:28 UTC (rev 1393750)
@@ -0,0 +1,116 @@
+--- a/build.py
++++ /dev/null
+@@ -1,103 +0,0 @@
+-#!/usr/bin/env python3
+-#
+-# SPDX-FileCopyrightText: 2017 Free Software Foundation Europe e.V. 
<https://fsfe.org>
+-# SPDX-FileCopyrightText: 2022 Carmen Bianca Bakker <[email protected]>
+-#
+-# SPDX-License-Identifier: GPL-3.0-or-later
+-
+-"""Script called by poetry. The API used by poetry is unstable, but let's hope
+-this stays functional.
+-"""
+-
+-import glob
+-import os
+-import shutil
+-import subprocess
+-from pathlib import Path
+-from warnings import warn
+-
+-from setuptools import Distribution
+-from setuptools.command.build_py import build_py
+-
+-# pylint: disable=attribute-defined-outside-init
+-
+-
+-class Build(build_py):
+-    """Redefined build."""
+-
+-    def initialize_options(self):
+-        super().initialize_options()
+-        self.po_files = None
+-        self.msgfmt = None
+-        self.mo_outputs = []
+-
+-    def finalize_options(self):
+-        super().finalize_options()
+-        self.po_files = glob.glob("po/*.po")
+-        for msgfmt in ["msgfmt", "msgfmt.py", "msgfmt3.py"]:
+-            self.msgfmt = shutil.which(msgfmt)
+-            if self.msgfmt:
+-                break
+-
+-    def run(self):
+-        super().run()
+-        if self.msgfmt:
+-            for po_file in self.po_files:
+-                self.announce(f"compiling {po_file}")
+-                lang_dir = str(
+-                    Path(self.build_lib)
+-                    / "reuse/locale"
+-                    / Path(po_file).stem
+-                    / "LC_MESSAGES"
+-                )
+-                destination = str(Path(lang_dir) / "reuse.mo")
+-                compile_func = lambda msgfmt, in_file, out: subprocess.run(
+-                    [msgfmt, in_file, "-o", out],
+-                    check=True,
+-                )
+-
+-                self.mkpath(lang_dir)
+-                self.make_file(
+-                    po_file,
+-                    destination,
+-                    compile_func,
+-                    (self.msgfmt, po_file, destination),
+-                )
+-                self.mo_outputs.append(destination)
+-
+-        else:
+-            warn("msgfmt is not installed. Translations will not be 
included.")
+-
+-    def get_outputs(self, include_bytecode=1):
+-        return (
+-            super().get_outputs(include_bytecode=include_bytecode)
+-            + self.mo_outputs
+-        )
+-
+-
+-def build():
+-    """Main function that runs the compilation."""
+-    distribution = Distribution(
+-        {
+-            "package_dir": {"": "src"},
+-        }
+-    )
+-    cmd = Build(distribution)
+-    cmd.inplace = 1
+-    cmd.ensure_finalized()
+-    cmd.run()
+-
+-    # Copy into src/. This appears to be the thing that actually does all the
+-    # heavy lifting. I'm not sure why I'm bothering with all the
+-    # setuptools-specific logic above.
+-    #
+-    # In summary: Get .mo files from build directory and put them into
+-    # src/reuse/locale/{lang}/LC_MESSAGES/reuse.mo.
+-    for output in cmd.get_outputs():
+-        relative = Path("src") / os.path.relpath(output, cmd.build_lib)
+-        relative.parent.mkdir(parents=True, exist_ok=True)
+-        shutil.copyfile(output, relative)
+-
+-
+-if __name__ == "__main__":
+-    build()
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -68,7 +68,6 @@ reuse = 'reuse._main:main'
+ 
+ [tool.poetry.build]
+ generate-setup-file = false
+-script = "build.py"
+ 
+ [build-system]
+ requires = ["poetry-core>=1.1.0", "setuptools"]

Reply via email to