python-cmake-format: new package for formatting CMakeLists.txt files (#24708)
* python-cmake-format: new package for formatting CMakeLists.txt files - tried to get modern python -m build to work with this package, but it wouldn't build properly with it. Reverting to python setup.py bdist_wheel works. - This package provides tools for parsing and providing a consistent format for CMakeLists.txt files. * rename to cmakelang to match project name and to match what other distros call it --------- Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
This commit is contained in:
parent
536974b878
commit
24464332e0
60
mingw-w64-cmakelang/PKGBUILD
Normal file
60
mingw-w64-cmakelang/PKGBUILD
Normal file
@ -0,0 +1,60 @@
|
||||
# Maintainer: Chris Gorman <chrisjohgorman@gmail.com>
|
||||
|
||||
_realname=cmakelang
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
pkgver=0.6.13
|
||||
pkgrel=1
|
||||
pkgdesc="Source code formater for CMake listfiles (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
||||
url='https://github.com/cheshirekow/cmake_format'
|
||||
license=('GPL-3.0-or-later')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-six"
|
||||
"git")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python-installer"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-setuptools")
|
||||
optdepends=("${MINGW_PACKAGE_PREFIX}-python-jinja"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-yaml"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-argcomplete")
|
||||
options=('!strip')
|
||||
_commit='904c42da298f7fda932d9ac774517c20e2667fb8'
|
||||
source=("${_realname}"::"git+https://github.com/cheshirekow/cmake_format.git#commit=${_commit}")
|
||||
sha256sums=('db1cdeb4bc4bac7896285f3b4bfa5b0af25cd187ca7454eeacfc8bb97d700e66')
|
||||
|
||||
build() {
|
||||
cp -r "cmakelang" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}"
|
||||
|
||||
# if we don't rename the jinja.py files the build process includes them and then we get an
|
||||
# error in packaging. step 1 rename the files to not have .py extensions.
|
||||
find cmakelang -name "*.jinja.py" -exec sh -c 'mv "$1" "${1%.py}"' _ {} \;
|
||||
|
||||
python cmakelang/pypi/setup.py bdist_wheel
|
||||
|
||||
# step 2 move the renamed .jinja files back to having .py extensions.
|
||||
find cmakelang -name "*.jinja" -exec mv {} {}.py \;
|
||||
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "python-build-${MSYSTEM}"
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
||||
python -m installer --prefix=${MINGW_PREFIX} \
|
||||
--destdir="${pkgdir}" dist/cmake_format*.whl
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
||||
python -m installer --prefix=${MINGW_PREFIX} \
|
||||
--destdir="${pkgdir}" dist/cmake_lint*.whl
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
||||
python -m installer --prefix=${MINGW_PREFIX} \
|
||||
--destdir="${pkgdir}" dist/cmake_parse*.whl
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
||||
python -m installer --prefix=${MINGW_PREFIX} \
|
||||
--destdir="${pkgdir}" dist/cmakelang*.whl
|
||||
|
||||
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user