Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meson-python: warning: Duplicate name clawpack/clawutil/{__init__ .py,data.py} #160

Closed
carlosal1015 opened this issue Nov 6, 2023 · 3 comments · Fixed by #161
Closed

Comments

@carlosal1015
Copy link

carlosal1015 commented Nov 6, 2023

Hi there, since 5.9.1 we had able to install using build/installer frontend before meson overhaul. I guess that it is an unintentional bug in meson.build.

asciicast

Since the installation guidelines advice is follow pip, this issue has low impact in users. Thanks.

This issue looks related with pandas-dev/pandas#54888.

The tarball with wheel generated is attached, if unzip we found two duplicates.

$ tar -xvf target.tar.gz 
clawpack-5.9.2-cp311-cp311-linux_x86_64.whl
$ unzip clawpack-5.9.2-cp311-cp311-linux_x86_64.whl 
Archive:  clawpack-5.9.2-cp311-cp311-linux_x86_64.whl
  inflating: clawpack-5.9.2.dist-info/METADATA  
  inflating: clawpack-5.9.2.dist-info/WHEEL  
  inflating: clawpack/pyclaw/classic/classic1.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/pyclaw/classic/classic2.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/pyclaw/classic/classic3.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/pyclaw/classic/classic2_sw_sphere.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/pyclaw/sharpclaw/sharpclaw1.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/pyclaw/sharpclaw/sharpclaw2.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/pyclaw/sharpclaw/sharpclaw3.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/pyclaw/sharpclaw/euler_sharpclaw1.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/pyclaw/sharpclaw/euler_tfluct1.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/pyclaw/limiters/weno/reconstruct.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/pyclaw/examples/shallow_sphere/sw_sphere_problem.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/acoustics_1D_ptwise.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/advection_1D_ptwise.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/acoustics_2D_ptwise.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/acoustics_1D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/acoustics_variable_1D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/advection_1D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/advection_color_1D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/burgers_1D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/cubic_1D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/traffic_1D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/traffic_vc_1D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/traffic_vc_fwave_1D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/traffic_vc_tracer_1D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/euler_with_efix_1D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/euler_hlle_1D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/mhd_roe_1D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/nonlinear_elasticity_fwave_1D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/reactive_euler_with_efix_1D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/shallow_hlle_1D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/shallow_roe_with_efix_1D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/shallow_bathymetry_fwave_1D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/shallow_roe_tracer_1D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/acoustics_2D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/acoustics_mapped_2D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/advection_2D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/burgers_2D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/euler_5wave_2D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/psystem_2D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/shallow_roe_with_efix_2D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/shallow_bathymetry_fwave_2D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/sw_aug_2D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/shallow_sphere_2D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/vc_acoustics_2D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/vc_advection_2D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/vc_elasticity_2D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/vc_acoustics_3D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/euler_3D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/burgers_3D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/vc_advection_3D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/kpp_2D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/shallow_hlle_2D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/euler_hlle_2D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/euler_hlle_with_walls_2D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/euler_mapgrid_2D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/riemann/euler_4wave_2D.cpython-311-x86_64-linux-gnu.so  
  inflating: clawpack/__init__.py    
  inflating: clawpack/clawutil/__init__.py  
  inflating: clawpack/clawutil/b4run.py  
  inflating: clawpack/clawutil/chardiff.py  
  inflating: clawpack/clawutil/clawcode2html.py  
  inflating: clawpack/clawutil/claw_git_status.py  
  inflating: clawpack/clawutil/data.py  
replace clawpack/clawutil/__init__.py? [y]es, [n]o, [A]ll, [N]one, [r]ename: 

target.tar.gz

@carlosal1015
Copy link
Author

Thanks for the effort. I tried again with https://github.com/clawpack/clawutil/pull/161.patch
asciicast

But the error is the same as before, looks similar to pypa/installer#106

[64/324] /tmp/makepkg/python-clawpack/src/clawpack-5.9.2/clawutil/src/python/clawutil/conversion/pyclaw/__init__.pymeson-python: warning: Duplicate name: 'clawpack/clawutil/__init__.py'
[66/324] /tmp/makepkg/python-clawpack/src/clawpack-5.9.2/clawutil/src/python/clawutil/data.pymeson-python: warning: Duplicate name: 'clawpack/clawutil/data.py'
[324/324] /tmp/makepkg/python-clawpack/src/clawpack-5.9.2/geoclaw/src/python/geoclaw/surge/storm.py
Successfully built clawpack-5.9.2-cp311-cp311-linux_x86_64.whl
==> Entering fakeroot environment...
==> Starting package()...
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/lib/python3.11/site-packages/installer/__main__.py", line 98, in <module>
    _main(sys.argv[1:], "python -m installer")
  File "/usr/lib/python3.11/site-packages/installer/__main__.py", line 94, in _main
    installer.install(source, destination, {})
  File "/usr/lib/python3.11/site-packages/installer/_core.py", line 109, in install
    record = destination.write_file(
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/installer/destinations.py", line 207, in write_file
    return self.write_to_fs(scheme, path_, stream, is_executable)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/installer/destinations.py", line 167, in write_to_fs
    raise FileExistsError(message)
FileExistsError: File already exists: /tmp/makepkg/python-clawpack/pkg/python-clawpack/usr/lib/python3.11/site-packages/clawpack/clawutil/__init__.py

@ketch
Copy link
Member

ketch commented Nov 13, 2023

In that case I have no idea what is wrong or how to fix it.

@carlosal1015
Copy link
Author

image

Issue was solved in some commit, there will no problems for 5.10. I tested with last snapshot 29 march 2024.

_base=clawpack
pkgname=python-${_base}
pkgdesc="Finite volume methods for hyperbolic conservation laws"
pkgver=5.9.2
pkgrel=3
arch=(x86_64)
url="https://www.${_base}.org"
license=('custom:BSD-3-clause')
depends=(python-matplotlib)
makedepends=(python-build python-installer meson-python python-wheel gcc-fortran git)
optdepends=('petsc: for petclaw support'
  'python-scipy: for euler support')
source=(${_base}-${pkgver}::git+https://github.com/${_base}/${_base}.git#commit=b87c8e74219dd6e8acad8eb753066b2296030d09
  github.com-clawpack-pyclaw::git+https://github.com/${_base}/pyclaw.git#commit=4fa92afbe6abd3282d39c82cb97a1bc5cfe62b45
  github.com-clawpack-visclaw::git+https://github.com/${_base}/visclaw.git#commit=4a344fd60623c6d48baa74a3e11400b8e5ba3bf1
  github.com-clawpack-clawutil::git+https://github.com/${_base}/clawutil.git#commit=fd0e5ded9f91266104b12469e205e23ba1ef9b15
  github.com-clawpack-riemann::git+https://github.com/${_base}/riemann.git#commit=7b4004c044d04900ca2de6bc6ae49fc23330c64f
  github.com-clawpack-amrclaw::git+https://github.com/${_base}/amrclaw.git#commit=784e4c41b2d4e25b363abbcc1913fef1c7be730d
  github.com-clawpack-geoclaw::git+https://github.com/${_base}/geoclaw.git#commit=acac99becfaa10ac33a344086e00832a70455f15
  github.com-clawpack-classic::git+https://github.com/${_base}/classic.git#commit=9d69dcbf8ea18fc6e6dadf386f22b44b3400e1ae)
sha512sums=('SKIP'
  'SKIP'
  'SKIP'
  'SKIP'
  'SKIP'
  'SKIP'
  'SKIP'
  'SKIP')

prepare() {
  cd ${_base}-${pkgver}
  sed -i 's/..\//https:\/\/github.com\/clawpack\//' .gitmodules
  git submodule init
  git config submodule.third_party/pyclaw.url "${srcdir}/github.com-clawpack-pyclaw"
  git config submodule.third_party/visclaw.url "${srcdir}/github.com-clawpack-visclaw"
  git config submodule.third_party/clawutil.url "${srcdir}/github.com-clawpack-clawutil"
  git config submodule.third_party/riemann.url "${srcdir}/github.com-clawpack-riemann"
  git config submodule.third_party/amrclaw.url "${srcdir}/github.com-clawpack-amrclaw"
  git config submodule.third_party/geoclaw.url "${srcdir}/github.com-clawpack-geoclaw"
  git config submodule.third_party/classic.url "${srcdir}/github.com-clawpack-classic"
  git -c protocol.file.allow=always submodule update
}

build() {
  cd ${_base}-${pkgver}
  python -m build --wheel --skip-dependency-check --no-isolation
}

package() {
  cd ${_base}-${pkgver}
  PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python -m installer --prefix=/usr --destdir="${pkgdir}" dist/*.whl
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants