Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #10284 > unrolled thread

pybuild: how to get the build directory name

Started byOle Streicher <olebole@debian.org>
First post2018-03-20 22:40 +0100
Last post2018-03-21 20:50 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.debian.maint.python


Contents

  pybuild: how to get the build directory name Ole Streicher <olebole@debian.org> - 2018-03-20 22:40 +0100
    Re: pybuild: how to get the build directory name Piotr Ożarowski <piotr@debian.org> - 2018-03-20 23:10 +0100
      Re: pybuild: how to get the build directory name Ole Streicher <olebole@debian.org> - 2018-03-21 20:50 +0100

#10284 — pybuild: how to get the build directory name

FromOle Streicher <olebole@debian.org>
Date2018-03-20 22:40 +0100
Subjectpybuild: how to get the build directory name
Message-ID<vvx97-1hA-15@gated-at.bofh.it>
Hi,

one of my Python packages has a test script under debian/tests that I
want to run at build time. The problem is now how to get the name of the
actual build directory, which is needed to be put into the PYTHONPATH:

Up to now, I did the following in debian/rules:

test-python%:
        HOME=/tmp/ PYTHONPATH=$(CURDIR)/.pybuild/pythonX.Y_$*/build python$* debian/tests/pyraf-test.py

override_dh_auto_test: $(PYTHON2:%=test-python%) $(PYTHON3:%=test-python%)

This however does not work anymore, since the subdir under .pybuild is
now changed to cpython2_2.7_pyraf resp. cpython3_3.6_pyraf.

To be backward compatible, I would however not like to just follow this
change. How can I get the correct build dir here?

Best regards

Ole

[toc] | [next] | [standalone]


#10285

FromPiotr Ożarowski <piotr@debian.org>
Date2018-03-20 23:10 +0100
Message-ID<vvxCa-1Ii-9@gated-at.bofh.it>
In reply to#10284
[Ole Streicher, 2018-03-20]
> test-python%:
>         HOME=/tmp/ PYTHONPATH=$(CURDIR)/.pybuild/pythonX.Y_$*/build python$* debian/tests/pyraf-test.py
> 
> override_dh_auto_test: $(PYTHON2:%=test-python%) $(PYTHON3:%=test-python%)
> 
> This however does not work anymore, since the subdir under .pybuild is
> now changed to cpython2_2.7_pyraf resp. cpython3_3.6_pyraf.

`pybuild --print build_dir --interpreter python3` or:

`pybuild --print '{build_dir}' --pyver 2.7`
`pybuild --print '{build_dir}' --pyver 3.6`

> To be backward compatible, I would however not like to just follow this
> change. How can I get the correct build dir here?

or even better (without using pybuild's internal paths):

  override_dh_auto_test:
  	dh_auto_test -- --system=custom --test-args '{interpreter} {dir}/debian/tests/pyraf-test.py'

-- 
GPG: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645

[toc] | [prev] | [next] | [standalone]


#10293

FromOle Streicher <olebole@debian.org>
Date2018-03-21 20:50 +0100
Message-ID<vvRUe-6nb-23@gated-at.bofh.it>
In reply to#10285
Dear Piotr,

Piotr Ożarowski <piotr@debian.org> writes:
> or even better (without using pybuild's internal paths):
>
>   override_dh_auto_test:
>   	dh_auto_test -- --system=custom --test-args '{interpreter} {dir}/debian/tests/pyraf-test.py'

That is optimal for me. Thank you very much for the hint!

Best regards

Ole

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.maint.python


csiph-web