Skip to content

Commit

Permalink
Suggested edits
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Feb 16, 2024
1 parent 40bde9d commit 7f1d531
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions build/sage_bootstrap/creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion src/doc/en/developer/packaging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 7f1d531

Please sign in to comment.