From 7f1d53135d1d95765b36b117d47465292a621546 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 15 Feb 2024 21:58:23 -0800 Subject: [PATCH] Suggested edits --- build/sage_bootstrap/creator.py | 5 ++--- src/doc/en/developer/packaging.rst | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/build/sage_bootstrap/creator.py b/build/sage_bootstrap/creator.py index 9d3854f50ae..a9a0384e129 100644 --- a/build/sage_bootstrap/creator.py +++ b/build/sage_bootstrap/creator.py @@ -82,11 +82,10 @@ def heading(title, char='-'): def _remove_files(self, files): """ - Remove ``files`` from the package directory if they exist + Remove ``files`` from the package directory if they exist. """ for file in files: try: - # Remove this file, which would mark the package as a pip package. os.remove(os.path.join(self.path, file)) except OSError: pass @@ -125,7 +124,7 @@ def set_python_data_and_scripts(self, pypi_package_name=None, source='normal'): # 'pip' should be the only wheel package that has a custom spkg-install.in script. # Remove the script for all other wheel packages, to avoid errors when # switching from normal to wheel packages. - self._remove_files(['spkg-build.in', 'spkg-install.in']) + self._remove_files(['spkg-build.in', 'spkg-install.in', 'spkg-install']) elif source == 'pip': with open(os.path.join(self.path, 'requirements.txt'), 'w+') as f: f.write('{0}\n'.format(pypi_package_name)) diff --git a/src/doc/en/developer/packaging.rst b/src/doc/en/developer/packaging.rst index c95cc27a9bc..ea391941c9c 100644 --- a/src/doc/en/developer/packaging.rst +++ b/src/doc/en/developer/packaging.rst @@ -92,7 +92,7 @@ the following source types: - its version number is defined by the required file ``package-version.txt``; - - No build and install scripts are needed + - no build and install scripts are needed (with one exception: the package :ref:`spkg_pip` installs itself from its wheel using a custom install script);