1
0
mirror of https://github.com/fedora-python/tox-current-env.git synced 2024-12-24 09:06:15 +01:00
Commit Graph

49 Commits

Author SHA1 Message Date
Lumir Balhar
3e9cd58704 Remove unused imports 2022-12-13 16:40:42 +01:00
Lumir Balhar
0e90086c0f Make __init__ methods noop and use env_dir instead of a temp dir 2022-12-13 16:38:59 +01:00
Lumir Balhar
14fd3c24c2 Compatibility with Tox 4 beta 1 2022-12-13 16:38:55 +01:00
Lumir Balhar
dadd0a954b Use our own subprocess executor to alter env variables 2022-12-13 16:38:49 +01:00
Lumir Balhar
70a344a8f9 Fake Python environment 2022-12-13 16:38:43 +01:00
Lumir Balhar
c5281c6243 Some more default options 2022-12-13 16:38:38 +01:00
Lumir Balhar
799e5ddda2 No longer check Python versions 2022-12-13 16:38:34 +01:00
Lumir Balhar
07e8536934 Add dummy installer so there is no chance to install packages 2022-12-13 16:38:31 +01:00
Lumir Balhar
ba4146c10d Empty list of commands means no need for SystemExit 2022-12-13 16:38:26 +01:00
Lumir Balhar
d6cb357233 Own executor is not needed if we can override config 2022-12-13 16:38:20 +01:00
Lumir Balhar
46fd9f0865 Use the default installer (pip) even it fails in an offline env 2022-12-13 16:38:14 +01:00
Lumir Balhar
5d3802da93 Use sysconfig instead of hardcoded paths 2022-12-13 16:38:09 +01:00
Lumir Balhar
bb79c6d405 Remove deprecated option --print-deps-only 2022-12-12 12:15:09 +01:00
Lumir Balhar
a223dc5e97 New plugin version for tox 4 alpha 2022-12-12 12:15:09 +01:00
Lumir Balhar
f55beb7537 Rename module hooks to hooks3 2022-12-12 12:15:09 +01:00
Miro Hrončok
34bd41f2bd
Do not run commands_pre or commands_post with --print-deps-to/--print-extras-to
Fixes https://github.com/fedora-python/tox-current-env/issues/58
2022-12-12 12:13:32 +01:00
Sorin Sbarnea
6e7459afce Avoid exception with tox.ini containing allowlist_externals
Fixes: https://github.com/fedora-python/tox-current-env/issues/45

Co-Authored-By: Miro Hrončok <miro@hroncok.cz>
2022-02-22 10:44:01 +01:00
Petr Viktorin
2cbcf96a70 Make tox_dependencies() a generator 2021-03-16 14:44:59 +01:00
Miro Hrončok
e7456d9645 Print tox requires with --print-deps-to
Partially fixes https://github.com/fedora-python/tox-current-env/issues/39
2021-02-16 10:57:21 +01:00
Miro Hrončok
a66b6f73d3 Print tox minversion with --print-deps-to
Partially fixes https://github.com/fedora-python/tox-current-env/issues/39
2021-02-15 22:43:44 +01:00
Miro Hrončok
9004590d6f DRY a function to detect "our" options 2020-11-25 10:39:26 +01:00
Miro Hrončok
4282332967 Properly test for our options in tox_runenvreport()
The tests were failing with "no module named pip" on Pythons without globally
available pip.
2020-11-25 10:39:26 +01:00
Miro Hrončok
ed9ff81816 Hotfix: Don't install any deps when --print-extras-to is used 2020-11-04 17:03:45 +01:00
Miro Hrončok
5577fb3704 When using the plugin's options, disable the usedevelop option
When enabled in tox.ini, tox-current-env attempted to run `setup.py develop`
in the current env.
2020-11-04 17:03:39 +01:00
Miro Hrončok
4212694dc6 Avoid clogging the arparse files, flush regularly 2020-09-30 15:13:18 +02:00
Miro Hrončok
6dd32b21ce Add the --print-extras-to(-file) option 2020-09-30 15:13:18 +02:00
Petr Viktorin
974f3334e3 Remove unneeded dest 2020-09-15 16:18:32 +02:00
Petr Viktorin
93e7f0b16a Deprecate --print-deps-only in favor of --print-deps-to-file=- 2020-09-15 14:25:53 +02:00
Miro Hrončok
ca5bba08a5 Add test and docstring to tox_runenvreport hook 2020-09-11 14:47:55 +02:00
Filipe Laíns
aca2fb563b
hooks: implement custom tox_runenvreport without a pip dependency
This gets rid of the pip dependency, undesirable in some cases.

Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-09-01 19:34:07 +01:00
Miro Hrončok
65cb96383b Drop support for tox < 3.13 (< 3.15 with Python 3.8+)
We have tox 3.13 in Fedora 31 running on Python 3.7
We have tox 3.15 in Fedora 32 running on Python 3.8
2020-08-13 12:05:10 +02:00
Fredrik Averpil
bfbc61a4b7
Avoid requiring admin rights on Windows
This fixes an error on Windows (I'm on with Python 3.7) where the symlink cannot be created without admin rights.

https://github.com/fedora-python/tox-current-env/pull/24
2020-08-10 11:58:17 +02:00
Miro Hrončok
dc47ce3ddf Remove duplicate code and only delete venv if needed
There is no associated issue. I was juts reading the code and noticed those
two related things.
2020-01-13 08:58:03 +01:00
Miro Hrončok
cf04976cea Only use tox_cleanup hook when it is possible 2019-09-27 21:58:30 +02:00
Miro Hrončok
a645fe2175 Clean fake venvs after --current-env
This makes it easier to run regular tox after tox --current-env,
however not the other way around.

The documented caveat remains the same: Don't mix those without -r.

Partially fixes https://github.com/fedora-python/tox-current-env/issues/14
2019-09-27 21:58:30 +02:00
Miro Hrončok
0863536aff Make --print-deps-only and --print-deps-to-file mutually exclusive 2019-08-12 16:17:41 +02:00
Miro Hrončok
7b6ccc79cb
Apply suggestions from code review
Co-Authored-By: Petr Viktorin <encukou@gmail.com>
2019-08-12 16:05:18 +02:00
Miro Hrončok
71d21b8266 Add --print-deps-to-file option for easier parsable dependencies
Fixes https://github.com/fedora-python/tox-current-env/issues/13
2019-08-01 12:39:12 +02:00
Miro Hrončok
4c81f356af Abort unsupported runs before installing the tested package 2019-07-29 14:37:17 +02:00
Miro Hrončok
45bac2d3ee Create current environemnt link when --print-deps-only has no env
Fixes https://github.com/fedora-python/tox-current-env/issues/9
2019-07-29 14:14:41 +02:00
Miro Hrončok
84ed602502 Move block of code a bit above (no chnages) 2019-07-29 14:14:41 +02:00
Miro Hrončok
a1bd7d9cab Don't blow up on missing interpreter
Fixes https://github.com/fedora-python/tox-current-env/issues/5
2019-07-23 14:37:06 +02:00
Miro Hrončok
ab18ab9088 Make --print-deps-only quite inert 2019-07-18 11:55:54 +02:00
Miro Hrončok
e5e6ae06c3 Do what we can without -r 2019-07-18 10:50:44 +02:00
Miro Hrončok
c9fe58c8eb Handle tox -r after --current-env 2019-07-17 18:57:52 +02:00
Petr Viktorin
2857e80ea0 Raise if requested interpreter doesn't match the current one 2019-07-17 16:48:12 +02:00
Petr Viktorin
410e937243 Nitpicks: Comments & typo 2019-07-17 16:04:55 +02:00
Miro Hrončok
4eaf432545 Very rough implementation 2019-07-17 15:56:12 +02:00
Miro Hrončok
bc3aa1e0a6 Initial commit 2019-07-17 13:54:09 +02:00