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

help to package tox-current-env on Debian #70

Closed
yuzibo opened this issue Oct 13, 2023 · 6 comments
Closed

help to package tox-current-env on Debian #70

yuzibo opened this issue Oct 13, 2023 · 6 comments

Comments

@yuzibo
Copy link

yuzibo commented Oct 13, 2023

Hi!

There is RFP(Request for package) on Debian . So I am trying to package it.

Packaging it like others python package, but I am stuck in tests here.
First, what is right step to run tests? I just run tox in d/rules from here

override_dh_auto_test:
	tox 

It should work. But I am confused how to explain the results:

...
removing build/bdist.linux-x86_64/wheel
Successfully built tox_current_env-0.0.11-py3-none-any.whl
I: pybuild plugin_pyproject:122: Unpacking wheel built for python3.11 with "installer" module
   debian/rules override_dh_auto_test
make[1]: Entering directory '/<<PKGBUILDDIR>>'
tox
# skipped because could not find python interpreter with spec(s): py36-p310
...
py311-tox324: install_deps> python -I -m pip install 'tox<3.25,>=3.24'
FAILED tests/test_integration_tox3.py::test_noquiet_installed_packages[None]
FAILED tests/test_integration_tox3.py::test_regular_after_first_print_deps_is_supported[--print-deps-to-file=-]
FAILED tests/test_integration_tox3.py::test_regular_after_first_print_deps_is_supported[--print-deps-to=-]
FAILED tests/test_integration_tox3.py::test_regular_after_first_print_deps_is_supported[--print-deps-only]
FAILED tests/test_integration_tox3.py::test_regular_run_native_toxenv - Asser...
============= 5 failed, 250 passed, 4 skipped, 1 xfailed in 18.15s =============
py311-tox324: exit 1 (18.60 seconds) /<<PKGBUILDDIR>>> pytest -v tests pid=3985560
py311-tox324: FAIL ✖ in 46.6 seconds
...
FAILED tests/test_integration_tox3.py::test_regular_run_native_toxenv - Asser...
FAILED tests/test_integration_tox3.py::test_noquiet_installed_packages[None]
FAILED tests/test_integration_tox3.py::test_regular_after_first_print_deps_is_supported[--print-deps-to=-]
FAILED tests/test_integration_tox3.py::test_regular_after_first_print_deps_is_supported[--print-deps-only]
FAILED tests/test_integration_tox3.py::test_regular_after_first_print_deps_is_supported[--print-deps-to-file=-]
============= 5 failed, 250 passed, 4 skipped, 1 xfailed in 14.10s =============
...
================== 185 passed, 2 skipped, 1 xfailed in 11.77s ==================
.pkg: _exit> python /usr/lib/python3/dist-packages/pyproject_api/_backend.py True setuptools.build_meta
  py36-tox324: SKIP (0.03 seconds)
  py36-tox3: SKIP (0.00 seconds)
  py37-tox324: SKIP (0.00 seconds)
  py37-tox3: SKIP (0.00 seconds)
  py37-tox4: SKIP (0.00 seconds)
  py38-tox324: SKIP (0.00 seconds)
  py38-tox3: SKIP (0.00 seconds)
  py38-tox4: SKIP (0.00 seconds)
  py39-tox324: SKIP (0.00 seconds)
  py39-tox3: SKIP (0.00 seconds)
  py39-tox4: SKIP (0.00 seconds)
  py310-tox324: SKIP (0.00 seconds)
  py310-tox3: SKIP (0.00 seconds)
  py310-tox4: SKIP (0.00 seconds)
  py311-tox324: FAIL code 1 (46.60=setup[27.99]+cmd[18.60] seconds)
  py311-tox3: FAIL code 1 (40.62=setup[26.07]+cmd[14.55] seconds)
  py311-tox4: OK (41.31=setup[29.14]+cmd[12.18] seconds)
  evaluation failed :( (128.62 seconds)

The specially failed log is here

yes, here only py311-tox4 was built ok, like py311-tox324 and py311-tox3
was built failed due to the same test failed.
The current Debain sid env is : python-3.11,
tox-4.11. So there is only one tox and python3 to test, like tox's goal.
So can I remove test_integration_tox3.py here? because Debian python team request a
test successfully for new package. In fact, this is my first time to touch tox plugin module,
if i am wrong somewhere, please let me know.
Thanks.

@hroncok
Copy link
Member

hroncok commented Oct 16, 2023

Hello. Don't remove anything, run only the tox environment you are able to run, i.e. py311-tox4.

@yuzibo
Copy link
Author

yuzibo commented Oct 17, 2023

Hello. Don't remove anything, run only the tox environment you are able to run, i.e. py311-tox4.

Thanks for your reply.
Could you help me to understand how to run it as you said?
I think the --current-env should do this automatlically. but it fails:

adding 'tox_current_env/__init__.py'
adding 'tox_current_env/hooks.py'
adding 'tox_current_env/hooks3.py'
adding 'tox_current_env/hooks4.py'
adding 'tox_current_env-0.0.11.dist-info/LICENSE'
adding 'tox_current_env-0.0.11.dist-info/METADATA'
adding 'tox_current_env-0.0.11.dist-info/WHEEL'
adding 'tox_current_env-0.0.11.dist-info/entry_points.txt'
adding 'tox_current_env-0.0.11.dist-info/top_level.txt'
adding 'tox_current_env-0.0.11.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Successfully built tox_current_env-0.0.11-py3-none-any.whl
I: pybuild plugin_pyproject:122: Unpacking wheel built for python3.11 with "installer" module
   debian/rules override_dh_auto_test
make[1]: Entering directory '/<<PKGBUILDDIR>>'
tox --current-env
usage: tox [-h] [--colored {yes,no}] [-v | -q] [--exit-and-dump-after seconds] [-c file] [--workdir dir] [--root dir] [--runner {virtualenv}] [--version] [--no-provision [REQ_JSON]] [--no-recreate-provision] [-r] [-x OVERRIDE]
           {run,r,run-parallel,p,depends,de,list,l,devenv,d,config,c,quickstart,q,exec,e,legacy,le} ...
tox: error: unrecognized arguments: --current-env
hint: if you tried to pass arguments to a command use -- to separate them from tox ones
make[1]: *** [debian/rules:11: override_dh_auto_test] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:8: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

@yuzibo
Copy link
Author

yuzibo commented Oct 17, 2023

I think I find your method, thanks

@hroncok
Copy link
Member

hroncok commented Oct 17, 2023

Run:

tox -e py311-tox4

@yuzibo
Copy link
Author

yuzibo commented Oct 18, 2023

Thanks! it works!

BTW,
this is one mirror spelling issue: accomodate -> accommodate found by Debian lintian tool. Need me to send a commit or you fix it if at it?

@hroncok
Copy link
Member

hroncok commented Oct 18, 2023

I've opened #71

@hroncok hroncok closed this as completed Oct 18, 2023
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

No branches or pull requests

2 participants