Package Details: cmake-init 0.40.6-1

Git Clone URL: https://aur.archlinux.org/cmake-init.git (read-only, click to copy)
Package Base: cmake-init
Description: The missing CMake project initializer
Upstream URL: https://github.com/friendlyanon/cmake-init
Keywords: CMake utility
Licenses: GPL3
Submitter: muio
Maintainer: muio
Last Packager: muio
Votes: 4
Popularity: 0.070954
First Submitted: 2021-09-20 16:14 (UTC)
Last Updated: 2024-04-13 15:05 (UTC)

Dependencies (2)

Required by (0)

Sources (1)

Latest Comments

muio commented on 2024-03-31 17:08 (UTC)

@vedranmiletic thank you.\ I tried to make changes you suggested and here's what I'm going to do going forward:

source=("${pkgname}-${pkgver}.tar.gz::https://github.com/friendlyanon/${pkgname}/archive/refs/tags/v${pkgver}.tar.gz")

build() {
  cd "$pkgname-$pkgver/package"
  python setup.py build
}

package() {
  cd "$pkgname-$pkgver/package"
  pip install --optimize=1 --root=${pkgdir}
}

notice how the directories are different.

There's also this warning that pops up in the package() step:

/usr/lib/python3.11/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()

looking at the suggested link, I didn't find any obvious way of fixing it.

vedranmiletic commented on 2024-03-26 10:18 (UTC)

@muio This did not work very well and I forgot the build step. Roughly:

source=("${pkgname}-${pkgver}.tar.gz::https://github.com/friendlyanon/${pkgname}/archive/refs/tags/v{pkgver}.tar.gz")

build() {
  cd "$pkgname-$pkgver"
  python setup.py build
}

package() {
  cd "$pkgname-$pkgver"
  python setup.py install --optimize=1 --root=${pkgdir}
}

vedranmiletic commented on 2024-03-26 10:10 (UTC)

@muio there is no pyproject.toml so it is hard to follow the guidelines.

Assuming source set to https://github.com/friendlyanon/$pkgname/archive/refs/tags/v$pkgver.tar.gz

The package() function should be something like

cd $pkgname-$pkgver cd package python setup.py install

carlosal1015 commented on 2023-12-31 19:41 (UTC)

The package should be named as cmake-init-bin

tocic commented on 2023-12-29 04:01 (UTC)

I do know how to prevent pip from complaining that it is being ran as root

I believe you shouldn't use pip at all. See https://wiki.archlinux.org/title/Python_package_guidelines.

I don't know how to fix the other two

Check out these links. In the end it might be an upstream issue as well (in that case it's worth to contact the author here).

muio commented on 2023-12-28 20:54 (UTC) (edited on 2023-12-28 20:54 (UTC) by muio)

Okay. Should I revert it back to the old method? If so, while I do know how to prevent pip from complaining that it is being ran as root by passing --root-user-action=ignore to it, I don't know how to fix the other two. Any ideas?

tocic commented on 2023-12-28 08:16 (UTC)

Well, yes, it fixed the build warnings since we don't build the package now. But I believe 1) we can't use the python files directly, i.e. use the package as a library; 2) maybe the package name should have the suffix -bin to illustrate that it was "built" by the upstream; 3) we definitely need to update the pkgrel field, see https://wiki.archlinux.org/title/PKGBUILD#pkgrel.

muio commented on 2023-12-28 00:37 (UTC) (edited on 2023-12-28 00:38 (UTC) by muio)

Just switched it to the Github .pyz releases instead of .whl files released on pypi. Less headaches and no more warnings. @tocic see if it's fixed on your end.

tocic commented on 2023-12-11 06:59 (UTC)

The warnings are still present in the 0.39.0 version. Could you please take a look at them? BTW, I can adopt this package if you want.

tocic commented on 2023-11-13 07:05 (UTC)

There are some warnings when building the 0.38.0 version:

WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
==> WARNING: Package contains reference to $srcdir
usr/lib/python3.11/site-packages/cmake_init-0.38.0.dist-info/direct_url.json
==> WARNING: Package contains reference to $pkgdir
usr/lib/python3.11/site-packages/cmake_init_lib/__pycache__/__init__.cpython-311.pyc
usr/lib/python3.11/site-packages/cmake_init_lib/__pycache__/__main__.cpython-311.pyc
usr/lib/python3.11/site-packages/cmake_init_lib/__pycache__/cmake_init.cpython-311.pyc
usr/lib/python3.11/site-packages/cmake_init_lib/__pycache__/template.cpython-311.pyc
usr/lib/python3.11/site-packages/cmake_init_lib/__pycache__/__init__.cpython-311.opt-1.pyc
usr/lib/python3.11/site-packages/cmake_init_lib/__pycache__/__main__.cpython-311.opt-1.pyc
usr/lib/python3.11/site-packages/cmake_init_lib/__pycache__/cmake_init.cpython-311.opt-1.pyc
usr/lib/python3.11/site-packages/cmake_init_lib/__pycache__/template.cpython-311.opt-1.pyc