xapian_wheel_builder - better metadata
* xapian_wheel_builder - better metadata Fixes: #203
This commit is contained in:
parent
3a98f1723b
commit
35cbaaa3d2
|
@ -81,12 +81,15 @@ else
|
||||||
"${VE}/bin/pip" install "sphinx<2"
|
"${VE}/bin/pip" install "sphinx<2"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
BASE_URI="https://oligarchy.co.uk/xapian/"
|
||||||
CORE="xapian-core-${VERSION}"
|
CORE="xapian-core-${VERSION}"
|
||||||
BINDINGS="xapian-bindings-${VERSION}"
|
BINDINGS="xapian-bindings-${VERSION}"
|
||||||
|
CORE_URI="${BASE_URI}${VERSION}/${CORE}.tar.xz"
|
||||||
|
BINDINGS_URI="${BASE_URI}${VERSION}/${BINDINGS}.tar.xz"
|
||||||
|
|
||||||
echo "Downloading source..."
|
echo "Downloading source..."
|
||||||
curl -O "https://oligarchy.co.uk/xapian/${VERSION}/${CORE}.tar.xz"
|
curl -O "${CORE_URI}"
|
||||||
curl -O "https://oligarchy.co.uk/xapian/${VERSION}/${BINDINGS}.tar.xz"
|
curl -O "${BINDINGS_URI}"
|
||||||
|
|
||||||
echo "Extracting source..."
|
echo "Extracting source..."
|
||||||
mkdir src
|
mkdir src
|
||||||
|
@ -172,7 +175,8 @@ for file in "${prefix}"/bin/xapian-delve*; do
|
||||||
done
|
done
|
||||||
|
|
||||||
# Prepare the scaffolding for the wheel
|
# Prepare the scaffolding for the wheel
|
||||||
cat > "$prefix/setup.py" <<EOF
|
cat > "${prefix}/setup.py" <<EOF
|
||||||
|
from pathlib import Path
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -185,18 +189,48 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
bdist_wheel = None
|
bdist_wheel = None
|
||||||
|
|
||||||
|
cwd = Path(__file__).parent
|
||||||
|
readme = (cwd / 'README').read_text()
|
||||||
|
|
||||||
setup(name='xapian',
|
setup(name='xapian',
|
||||||
version='${VERSION}',
|
version='${VERSION}',
|
||||||
description='Xapian Bindings for Python3',
|
description='Xapian Library and Bindings for Python as packaged for local use by xapian-haystack',
|
||||||
|
long_description=readme,
|
||||||
|
long_description_content_type='text/plain',
|
||||||
|
license='GPL2',
|
||||||
|
classifiers=[
|
||||||
|
'License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)',
|
||||||
|
'Programming Language :: Python :: 3 :: Only',
|
||||||
|
],
|
||||||
packages=['xapian'],
|
packages=['xapian'],
|
||||||
cmdclass={'bdist_wheel': bdist_wheel},
|
cmdclass={'bdist_wheel': bdist_wheel},
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
zip_safe=False)
|
zip_safe=False)
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat > "$prefix/MANIFEST.in" <<EOF
|
cat > "${prefix}/MANIFEST.in" <<EOF
|
||||||
include xapian/*
|
include xapian/*
|
||||||
EOF
|
EOF
|
||||||
|
cat > "${prefix}/README" <<EOF
|
||||||
|
This wheel contains the xapian library and python bindings.
|
||||||
|
It was built using \`xapian_wheel_builder.sh\` from the Xapian Haystack project.
|
||||||
|
|
||||||
|
Xapian Haystack is a Xapian backend for Django-Haystack.
|
||||||
|
https://github.com/notanumber/xapian-haystack
|
||||||
|
|
||||||
|
The Xapian version used in this wheel is: ${VERSION}
|
||||||
|
The sources were downloaded from the xapian upstream:
|
||||||
|
- ${CORE_URI}
|
||||||
|
- ${BINDINGS_URI}
|
||||||
|
|
||||||
|
Xapian's homepage can be found at https://xapian.org/
|
||||||
|
|
||||||
|
You can find the script used to build this specific wheel inside of itself.
|
||||||
|
EOF
|
||||||
|
|
||||||
|
(cd "${WHL_DEST}"; cp "$0" "${prefix}/xapian/xapian_wheel_builder.sh")
|
||||||
|
|
||||||
|
cp "src/${CORE}/COPYING" "${prefix}/LICENSE.txt"
|
||||||
|
|
||||||
(
|
(
|
||||||
cd target
|
cd target
|
||||||
|
|
Loading…
Reference in New Issue