summaryrefslogtreecommitdiff
path: root/setup.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix pylint/pycodestyle warnings with latest versionsCole Robinson2022-12-131-1/+1
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* Fix build with setuptools 61+Miro HronĨok2022-08-021-0/+3
| | | | | | | | | | | | | | | + ./setup.py configure --default-hvs qemu,xen,lxc error: Multiple top-level packages discovered in a flat-layout: ['po', 'ui', 'man', 'data', 'virtinst', 'virtManager']. To avoid accidental inclusion of unwanted files or directories, setuptools will not proceed with this build. If you are trying to create a single distribution with multiple packages on purpose, you should not rely on automatic discovery. Instead, consider the following options: 1. set up custom discovery (`find` directive with `include` or `exclude`) 2. use a `src-layout` 3. explicitly set `py_modules` or `packages` with a list of names To find more information, look for "package discovery" on setuptools docs. Downstream bug report: https://bugzilla.redhat.com/2113754
* Install before updating cache & compiling schemasRyan Schmidt2022-06-131-2/+2
| | | Closes #400
* setup: add bits for setuptools-61Peter Alfredsen2022-04-131-0/+1
| | | | | | | | | | | | | | | Quoting https://github.com/pypa/setuptools/issues/3227 "Setuptools >= 61, intentionally changes the way packages are built in the sensec that it will try to find files and fail if something is weird. Empty packages (like this one), are asked to explicitly add packages=[] to their configuration. This intentional change in behaviour is described in https://setuptools.pypa.io/en/latest/history.html#v61-0-0." Bug: https://bugs.gentoo.org/836645 Signed-off-by: Peter Alfredsen <crabbedhaloablution@icloud.com>
* setup: Plan for newer setuptools providing distutils back compatCole Robinson2022-01-271-6/+11
| | | | | | | | | | setuptools still doesn't natively provide some infrastructure we need, but newer versions will keep 'import distutils' working until those issues are addressed. I think we need to reorder imports to take advantage of it though. It silences some deprecation warnings at least Signed-off-by: Cole Robinson <crobinso@redhat.com>
* Replace deprecated `imp` usage with `importlib`Cole Robinson2021-10-041-12/+9
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* pylint: More attempts to silence gi warnings with -j optionCole Robinson2021-07-291-3/+3
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* setup: Mostly convert to setuptoolsCole Robinson2021-05-231-39/+37
| | | | | | | | | | | | | distutils is slated for removal in python3 eventually: https://www.python.org/dev/peps/pep-0632/ Mostly switch to setuptools. There's still an issue with the way that we extend the 'build' command that doesn't seem to have a setuptools equivalent, but we can hack around it if needed. Closes: #252 Signed-off-by: Cole Robinson <crobinso@redhat.com>
* pylint: Make sure we lint against Gtk3Cole Robinson2021-04-061-1/+8
| | | | | | | We need to pass virtmanager.py to pylint first, so it detects the require_version() call Signed-off-by: Cole Robinson <crobinso@redhat.com>
* man: Convert .pod files to .rstCole Robinson2020-09-131-19/+14
| | | | | | | Used pod2rst for the initial conversion but a lot of manual fixup afterwards. Signed-off-by: Cole Robinson <crobinso@redhat.com>
* Rename pylintrc -> .pylintrcCole Robinson2020-07-171-1/+1
| | | | | | Plain pylint calls pick that up as well Signed-off-by: Cole Robinson <crobinso@redhat.com>
* spec: Move virt-manager.spec.in -> virt-manager.specCole Robinson2020-07-171-17/+1
| | | | | | | | | Drop the VERSION templating. Tools today like packit and tito work best when a working .spec file exists. The extra burden is we need to update the version at release time, but that's no big deal Signed-off-by: Cole Robinson <crobinso@redhat.com>
* setup: Force 'rpm' to output to the git dirCole Robinson2020-07-171-6/+11
| | | | | | And modernize it to use subprocess and report error output Signed-off-by: Cole Robinson <crobinso@redhat.com>
* setup: Kill old test_* command infrastructureCole Robinson2020-07-171-216/+7
| | | | | | | pytest invocations are now preferred. Leave plain `./setup.py test` as a stub that errors and points to pytest. Signed-off-by: Cole Robinson <crobinso@redhat.com>
* tests: Add pytest conftest.pyCole Robinson2020-07-171-1/+1
| | | | | | | | | | Makes 'pytest' and 'pytest --cov' work for the standard tests. uitests run with `pytest --uitests --cov=virtManager`. test_urls.py, test_dist.py, test_inject.py need to be invoked like pytest $PATH Signed-off-by: Cole Robinson <crobinso@redhat.com>
* setup: Use xgettext --add-comments=translatorsCole Robinson2020-07-111-0/+1
| | | | | | | So in the code we can prefix comments with 'translators:' before translated strings to have them show up in .pot file output Signed-off-by: Cole Robinson <crobinso@redhat.com>
* setup: Tweak extract_messagesCole Robinson2020-07-111-5/+10
| | | | | | | * Use long xgettext options * Truncate .pot file upfront so every call uses --join-existing Signed-off-by: Cole Robinson <crobinso@redhat.com>
* Handle AppStream files using gettextPino Toscano2020-07-111-47/+7
| | | | | | | | | | | | | | Starting from version 0.19.6, gettext has native capabilities to extract from, and merge back translations in AppStream files. Hence, use xgettext to extract messages, and msgfmt to create AppStream files with translations; because of this, there no more need to prefix with underscore the tags to be translated. Update the gettext required version in INSTALL.md. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Pino Toscano <ptoscano@redhat.com>
* Handle desktop files using gettextPino Toscano2020-07-111-3/+34
| | | | | | | | | | | | | | Starting from version 0.19, gettext has native capabilities to extract from, and merge back translations in desktop files. Hence, use xgettext to extract messages, and msgfmt to create a desktop file with translations; because of this, there no more need to prefix with underscore the keys to be translated. Update the gettext required version in INSTALL.md. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Pino Toscano <ptoscano@redhat.com>
* setup: use msgmerge for updating translationsPino Toscano2020-07-111-45/+5
| | | | | | | | | | | | | | | Switch from intltool to msgmerge to merge the translations to the catalog, as it is much easier. Remove the writing of the temporary POTFILES.in, as it is no more needed now. Also, since now gettext is used at installation time: - mention the gettext requirement in INSTALL.md - add the gettext BuildRequires in the RPM spec file Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Pino Toscano <ptoscano@redhat.com>
* setup: add a extract_messages commandPino Toscano2020-07-111-0/+51
| | | | | | | | | | | Add a separate command to extract the messages; this also changes the way messages are extracted: - keep using intltool for desktop and AppStream files - use xgettext directly for Python sources, and UI files; this is way more flexible than intltool Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Pino Toscano <ptoscano@redhat.com>
* setup: split listing of .in sources for POTFILESPino Toscano2020-07-111-2/+8
| | | | | | | | Extract them from _generate_potfiles_in() to an own _generate_meta_potfiles_in() function. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Pino Toscano <ptoscano@redhat.com>
* setup: Run codespell on more filesCole Robinson2020-01-281-4/+13
| | | | | | And fix the results Signed-off-by: Cole Robinson <crobinso@redhat.com>
* urlfetcher: move mock code to the testsuiteCole Robinson2020-01-271-0/+5
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* setup: Skip coverage report when tests are aborted or skippedCole Robinson2020-01-271-1/+8
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* tests: Rename all test files to have test_ prefixCole Robinson2020-01-271-6/+6
| | | | | | This will help for a possible future conversion to pytest Signed-off-by: Cole Robinson <crobinso@redhat.com>
* tests: Move all data directories to data/Cole Robinson2020-01-271-2/+2
| | | | | | This cleans up the file hierarchy a bit Signed-off-by: Cole Robinson <crobinso@redhat.com>
* Move virt-* code into their modulesCole Robinson2020-01-261-25/+25
| | | | | | | | | | | | | This layout is closer to what most python modules have nowadays. It also simplifies testing and static analysis setup. Keep virt-* wrappers locally, for ease of running these commands from a git checkout. Adjust the wrapper binaries we install on via packaging to be pure python, which makes things like running gdb easier. Signed-off-by: Cole Robinson <crobinso@redhat.com>
* Remove virt-convertCole Robinson2020-01-241-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | | This was raised here: https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html Quoting from that: """ virt-convert takes an ovf/ova or vmx file and spits out libvirt XML. It started as a code drop a long time ago that could translate back and forth between vmx, ovf, and virt-image, a long dead appliance format. In 2014 I converted it to do vmx -> libvirt and ovf -> libvirt which was a CLI breaking change, but I never heard a peep of a complaint. It doesn't seem to do a particularly thorough job at its intended goal, I've seen 2-3 bug reports in the past 5 years and generally it doesn't seem to have any users. Let's kill it. If anyone has the desire to keep it alive it could live as a separate project that's a wrapper around virt-install but there's no compelling reason to keep it in virt-manager.git IMO """ Nothing has changed since then, so here is the removal. Signed-off-by: Cole Robinson <crobinso@redhat.com>
* Install the AppStream file to the canonical locationPino Toscano2020-01-141-1/+1
| | | | | | | | | The canonical location for AppStream XML files has been changed to /usr/share/metainfo four years ago at least, with /usr/share/appdata left as legacy location. It is time to switch to the right location. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Pino Toscano <ptoscano@redhat.com>
* setup: Remove dep on importing virtinstCole Robinson2019-06-171-22/+17
| | | | | | | | | Import BuildConfig directly from the source file using import hackery. buildconfig.py is independent of virtinst code so it already does the right thing. Add some checking to make sure this doesn't regress in the future. Drop the now unneeded RPM deps.
* setup: Undo previous file search changesCole Robinson2019-06-171-13/+18
| | | | They were totally busted
* setup: Use smarter py file searchingCole Robinson2019-06-171-6/+13
|
* setup: Fix test_urls coverage testingCole Robinson2019-06-161-5/+9
| | | | And exclude some error handling
* Move virtcli/cliconfig.py to virtinst/buildconfig.pyCole Robinson2019-06-141-23/+44
| | | | | There's really no reason for the split, just contain it all within virtinst for simplicity
* virtinst: Add a lot of test code coverageCole Robinson2019-06-091-1/+1
| | | | | | * Delete dead code * Add tests for various device default code paths * Rework certain conditions a bit so code coverage always hits them
* setup: Omit progress.py from coverage outputCole Robinson2019-06-091-1/+1
| | | | Since it's copied code that we rarely touch
* setup: Make codespell an optional part of the 'pylint' targetCole Robinson2019-05-161-27/+12
|
* tests: test_urls: Add --*libosinfo, --iso-only, --url-onlyCole Robinson2019-03-241-6/+26
| | | | | | These are options that will help tweak the test_urls logic, to help as we try to ensure libosinfo covers all the cases we care about.
* setup: Remove vestiges of test_urls --path optionCole Robinson2019-02-031-12/+0
|
* pycodestyle: Only use format=pylint from setup.pyCole Robinson2019-01-301-0/+1
| | | | Don't force it on users who are running the tool manually
* Move tests.pycodestyle.cfg to setup.cfgCole Robinson2019-01-301-1/+1
| | | | This makes manual pycodestyle calls pick up our project config
* Move tests/pylint.cfg to pylintrcCole Robinson2019-01-301-1/+1
| | | | This makes manual pylint calls pick up our project config
* setup: Generate bashcompletion files in builddirCole Robinson2018-12-181-21/+15
|
* setup.py: Install the bash completion filesLin Ma2018-12-181-0/+29
| | | | Signed-off-by: Lin Ma <lma@suse.com>
* pylint: Don't exclude progress.pyRadostin Stoyanov2018-11-121-5/+1
| | | | | | | | Currently progress.py file was excluded from pylint/pycodestyle check because the code was straight from python-urlgrabber and it was not PEP8 compliant. The following patched resolve the code style issues. Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
* setup: Remove configure --openssh-askpassCole Robinson2018-10-081-5/+0
| | | | | | | | | | | For one, we don't offer to install it anymore because we dropped packagekit stuff. But even having a single package here isn't really the whole story because different desktops have their own askpass providers, like Fedora has openssh-askpass for GNOME, but ksshaskpass for KDE So drop it all, make the error more generic, and point people to setting up SSH keys too
* setup: Remove configure --{libvirt,kvm}-package-namesCole Robinson2018-10-071-12/+0
| | | | | This was really only useful with packagekit integration, which is now gone
* virtinst: Remove stable_defaults conceptCole Robinson2018-10-061-6/+0
| | | | | | | | This switch says: if we detect a rhel host, use special version checks that match rhel backports. This pattern sucks. The way forward is to have libvirt advertise the bits that are supported, through domcapabilities. Then virt-manager/virtinst can react as appropriate.
* cliconfig: Remove --preferred-distrosCole Robinson2018-10-061-5/+0
| | | | It's less relevant with our new search based OS list