1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Merge pull request #74 from ailin-nemui/makedist

Add some missing files to make-dist
This commit is contained in:
ailin-nemui 2022-02-21 17:52:15 +01:00 committed by GitHub
commit 4bf129084f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 48 additions and 5 deletions

View File

@ -2,12 +2,13 @@ global-include meson.build
recursive-include src *.c *.h meson.build recursive-include src *.c *.h meson.build
recursive-include src/perl *.c *.h *.xs *.pm *.pl typemap meson.build recursive-include src/perl *.c *.h *.xs *.pm *.pl typemap meson.build
recursive-include src/fe-fuzz *.c *.h *.txt meson.build
recursive-include tests *.c meson.build recursive-include tests *.c meson.build
include meson_options.txt include meson_options.txt
include subprojects/*.wrap include subprojects/*.wrap
prune subprojects/*/ # prune subprojects/*
include utils/*.pl utils/*.sh include utils/*.pl utils/*.sh
exclude utils/make-dist.sh exclude utils/make-dist.sh
@ -17,9 +18,18 @@ include themes/*.theme
include docs/*.1 docs/*.txt docs/*.html include docs/*.1 docs/*.txt docs/*.html
include docs/help/in/[a-z]*.in include docs/help/in/[a-z]*.in
include scripts/*.pl scripts/examples/*.pl include scripts/*.pl scripts/examples/*.pl
include irssi-icon.png
include NEWS include NEWS
include INSTALL
include TODO
include ChangeLog
prune Build include .clang-format
prune dist
# prune Build
# prune dist
prune *.egg-info prune *.egg-info
# ignore fuzz-support/fuzz.diff
# ignore utils/clang-format-xs/*

View File

@ -22,8 +22,15 @@ fi
cd "$repo_root" cd "$repo_root"
./utils/check-perl-hash.sh ./utils/check-perl-hash.sh
if [ -f pyproject.toml ] || [ -f setup.cfg ]; then
echo "**Error**: ${PKG_NAME} make-dist.sh cannot be run in Dist directory, cannot proceed."
exit 1
fi
rm -fr "$dist_tmp" rm -fr "$dist_tmp"
git clone --no-local "$repo_root" "$dist_tmp" echo "Cloning to \`$dist_tmp'..."
git clone --quiet --no-local "$repo_root" "$dist_tmp"
cd "$dist_tmp" cd "$dist_tmp"
if [ ! -f meson.build ]; then if [ ! -f meson.build ]; then
echo "**Error**: ${PKG_NAME} make-dist.sh could not find meson.build, cannot proceed." echo "**Error**: ${PKG_NAME} make-dist.sh could not find meson.build, cannot proceed."
@ -37,22 +44,48 @@ if [ -z "$name" ] || [ -z "$version" ]; then
exit 1 exit 1
fi fi
git log > ChangeLog
cat <<PYPROJECT_TOML >pyproject.toml
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
PYPROJECT_TOML
cat <<SETUP_CFG >setup.cfg cat <<SETUP_CFG >setup.cfg
[metadata] [metadata]
name = $name name = $name
version = $version version = $version
url = https://ailin-nemui.github.io/irssi/ url = https://ailin-nemui.github.io/irssi/
maintainer = Ailin Nemui maintainer = Ailin Nemui
maintainer_email = @
license = GNU General Public License v2 or later (GPLv2+) license = GNU General Public License v2 or later (GPLv2+)
[check-manifest]
ignore =
pyproject.toml
$(perl -a -l -n -e '$F[0] eq "#" and $F[1] eq "ignore" and print " @F[2..$#F]"' MANIFEST.in)
SETUP_CFG SETUP_CFG
python3 -c 'from setuptools import *;setup()' sdist --formats=tar
if command -v check-manifest >/dev/null; then
echo "Checking MANIFEST.in..."
check-manifest --ignore ChangeLog
else
echo "**Warning**: check-manifest not found, did not check MANIFEST.in"
fi
echo "Creating sdist..."
python3 -W ignore -c 'from setuptools import *;setup()' --quiet sdist --formats=tar
tar --delete --file "dist/$name-$version.tar" \ tar --delete --file "dist/$name-$version.tar" \
"$name-$version/setup.cfg" \ "$name-$version/setup.cfg" \
"$name-$version/pyproject.toml" \
"$name-$version/$name.egg-info" \ "$name-$version/$name.egg-info" \
"$name-$version/PKG-INFO" "$name-$version/PKG-INFO"
echo "Zipping..."
xz -k "dist/$name-$version.tar" xz -k "dist/$name-$version.tar"
gzip -k "dist/$name-$version.tar" gzip -k "dist/$name-$version.tar"