Commit Graph

91 Commits

Author SHA1 Message Date
Luca Weiss
e9ba30a255 setup: Install files in new virtinst folders
In commits fe9ed23 and 3909c10 several files were moved to subfolder of
virtinst, but they are not covered by the existing glob in the setup.py
file. Fix that by adding those subfolders explicitely.
2018-04-12 10:15:51 +02:00
Daniel P. Berrangé
48e32b429d Fix copyright header to specify GPLv2 or later, not GPLv2 only.
The copyright headers in every file were chjanged in this previous commit

  commit b6dcee8eb7
  Author: Cole Robinson <crobinso@redhat.com>
  Date:   Tue Mar 20 15:00:02 2018 -0400

    Use consistent and minimal license header for every file

Where before this they said "

  "either version 2 of the License, or (at your option) any later version."

Now they just say

  "GNU GPLv2"

This fixes it to say "GNU GPLv2 or later" again.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-04 16:51:37 -04:00
Cole Robinson
bd891eb380 virtcli: Add python3 version check
Assume 3.4 is needed, we may support earlier but I doubt anyone
is going to get all the deps in place on a distro that old
2018-03-21 18:00:38 -04:00
Cole Robinson
b6dcee8eb7 Use consistent and minimal license header for every file 2018-03-21 07:29:40 -04:00
Cole Robinson
465b04ea18 Remove gconf->gsettings conversion script
It was first released with v1.2.0 in May 2015. I think that's long
enough for people to have run the app and had their settings
converted.
2018-03-16 14:41:53 -04:00
Radostin Stoyanov
a52c282ed3 pycodestyle: Use module instead of executable
The `pycodestyle-3` executable is provided by the
`python3-pycodestyle` rpm package.
On Debian the corresponding executable is called `pycodestyle3`.
Arch Linux uses Python 3 by default and `python2-pycodestyle`
package is used for the py2 version.

To get around this inconsistency, import the `pycodestyle` module and
call the corresponding methods. The implementation has similar
behaviour to what happens when `pycodestyle` [1] is executed from the
command-line.

[1] https://github.com/PyCQA/pycodestyle/blob/master/pycodestyle.py

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2018-03-03 16:04:18 -05:00
Radostin Stoyanov
4f7bc4f4e6 pylint: Use pylint.lint module
The `pylint-3` executable is provided by the python3-pylint rpm
package on Fedora.
For Debian the equivalent is `pylint3`.
On Arch Linux the default version of Python is 3.

Pylint lints for the version of Python it is running. Instead of
spawning an executable, import the `pylint.lint` module and call
`Run()`.

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2018-03-03 15:59:05 -05:00
Cole Robinson
47afa912b3 setup: tests: Add --testverbose option
Can't use --verbose because it conflicts with setuptools options
2018-02-22 15:18:47 -05:00
Cole Robinson
c05cd52772 setup: Use CLIState for setting --debug value 2018-02-22 15:18:47 -05:00
Cole Robinson
4205272384 tests: Add explicit test_dist target
Things like po validation don't need to be done on every test run
2018-02-20 12:33:57 -05:00
Cole Robinson
1302156265 setup: Add explicit error if running with python2 2018-02-16 12:37:54 -05:00
Cole Robinson
de791136c1 setup: Use pylint-3 2018-02-06 19:02:53 -05:00
Cole Robinson
ddba9c1702 Switch to python3 in script shebang
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2018-02-06 18:56:15 -05:00
Cole Robinson
4b4f532417 uitests: Wire up --coverage
Need to launch the external coverage process to actually measure
things
2018-01-09 13:51:53 -05:00
Cole Robinson
044d93d471 tests: Rework how we pass command line objects down to test data 2018-01-08 17:05:55 -05:00
Cole Robinson
89945118df uitests: Make unittest.installHandler work as expected
And ctrl-c exiting in general.
2018-01-08 09:21:42 -05:00
Cole Robinson
cf165241a1 tests: Force verbose mode for UI tests 2018-01-08 09:21:42 -05:00
Cole Robinson
6009044463 tests: Don't always generate coverage data
We were doing this unconditionally, and on my laptop it seems to be
responsible for about 20% of the runtime... whoops!
2018-01-08 09:21:42 -05:00
Cole Robinson
c727db2380 tests: Drop --skipcli option
cli tests are much faster nowadays, this option isn't all that useful
2018-01-06 14:04:34 -05:00
Cole Robinson
c7ed34de63 tests: test_urls: Big rework
Move all the test cases to an .ini file. Various cleanups and
minor improvements throughout
2018-01-06 14:04:34 -05:00
Pavel Hrdina
ec266d3cda setup: introduce --jobs for pylint
Pylint supports configuring jobs to use multiple processes to
speed up Pylint.  Default value is 1.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-09-09 11:10:42 +02:00
Chen Hanxiao
c92aade081 pycodestyle: fix all E203 warnings
Fix all E203 whitespace before ':'
   Also remove E203 ignore option of pycodestyle

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2017-08-11 00:01:38 +08:00
Radostin Stoyanov
b93cc3bbc9 pycodestyle: Do not use bare 'except:'
A bare 'except:' catches all exceptions [1], including SystemExit,
KeyboardInterrupt, and GeneratorExit (which is not an error and should
not normally be caught by user code). In situations where you need to
catch all “normal” errors, you can catch the base class for all normal
exceptions, Exception [2].

[1] https://docs.python.org/2/howto/doanddont.html#except
[2] https://docs.python.org/2/library/exceptions.html#Exception
2017-08-02 13:57:43 -04:00
Radostin Stoyanov
2fd6d9aa32 tests: Upgrade pep8 to pycodestyle
The PEP8 [1] project has been renamed to pycodestyle [2].

[1] https://github.com/codeclimate/pep8
[2] https://github.com/pycqa/pycodestyle
2017-08-02 13:23:20 -04:00
Cole Robinson
8d8b353b28 virtinst: Fix bare python3 style print()
We want a newline, so pass it ""
2017-07-10 09:34:22 -04:00
Cole Robinson
ced1d3cadb setup: pylint: use pylint-2 binary if available 2017-06-15 08:11:34 -04:00
Cole Robinson
f551d7e55d Replace file() usage with open()
Same semantics, but the latter is needed for python3
2017-05-05 14:53:12 -04:00
Cole Robinson
55288c4551 Convert to python3 style print() syntax
Use __future__ imports to keep this working for python2
2017-05-05 14:52:37 -04:00
Cole Robinson
158a1e0572 setup: test: up verbosity if --debug is passed 2016-07-20 18:15:27 -04:00
Cole Robinson
df5c688c11 tests_inject: Update to use standard --only option
Rather than custom --distro option. And fix the URL list
2016-06-17 18:41:50 -04:00
Cole Robinson
cf3a1cc1f0 appdata: Modernize, and translate it
This also revealed our translations were busted for .desktop files
as well, so rework the POTFILES.in generation to account for it
2016-06-17 18:06:07 -04:00
Cole Robinson
927990ad9d tests: clitest: Allow --only matching on output filename
So you can do "python setup.py --only many-devices' to only run the
clitest compare tests that output their results to files with
"many-devices" in the name
2016-06-11 15:58:48 -04:00
Cole Robinson
f4dfb6de9d Fix recent pylint/pep8 output 2016-04-18 16:42:12 -04:00
Cole Robinson
fe722b99cb setup: Make gsettings always work regardless of install dir (bz #1267377)
Most of this is lifted from 'meld'. The bits are

- compile gsettings schemas at setup.py install time
- add options to disable that, and use them in the RPM
- always pass GSETTINGS_SCHEMA_DIR so gsettings loading always works
  regardless of the install dir

https://bugzilla.redhat.com/show_bug.cgi?id=1267377
2015-11-02 21:02:42 -05:00
Cole Robinson
293a1d1509 setup: Use full distutils import paths
Improves clarity
2015-11-02 17:21:06 -05:00
Cole Robinson
554a39ddae setup: Fix system install on ubuntu
Ubuntu ends up installing in /usr/local, even though system prefix
variable tells us it's /usr. Lots of UI things don't work in /usr/local,
so point it back at /usr.
2015-09-23 19:29:13 -04:00
Cole Robinson
d5d6cfff2c Copy urlgrabber progress bar code into virt-manager.git
This is so we can drop the dep on system python-urlgrabber, which will
block us from going to python3.

All we need is like 300 lines from python-urlgrabber for the progress
bar. In reality our needs are much lower, we don't need the fancy
progress bar that urlgrabber provides, but it's nice to have. So if
keeping a copy of this code causes issues in the future, we can probably
come up with something simpler (or hopefully there's a more common
python progressbar impl that we can use at that point).
2015-09-18 20:55:44 -04:00
Cole Robinson
a51c12660f setup: Do pep8 before pylint
pep8 is super quick, so if there's issue devs can fix those while pylint
is running and gives exhaustive output
2015-09-13 15:07:23 -04:00
Cole Robinson
91e2d502bb tests: Add test_ui target for dogtail UI tests, add an example 2015-09-09 14:26:50 -04:00
Cole Robinson
1237be9d1a virt-install: Clean up created disk images if VM creation fails
We are conservative here, only cleaning up disk images if libvirt
fails to even accept the XML. Otherwise the VM may already be
running or defined, and the user has to do some cleanup anyways.
2015-09-06 14:27:37 -04:00
Cole Robinson
4c361933ea tests: Have the property checker work on whole test suite
Not just xmlparse.py. So we can test a new property via clitest and
not always via xmlparse
2015-04-21 20:15:37 -04:00
Cole Robinson
ef5552d0aa configure: Add --default-hvs, kill --with-bhyve
Takes a comma separated list of HVs, and only shows those as options in
the 'Open Connection' wizard. This option can be used to hide the bhyve
option as well, so drop --with-bhyve
2015-04-06 16:29:28 -04:00
Cole Robinson
6ccbec6b30 setup: Give warning if installing schemas into non-/usr/share (bz 1122537) 2015-04-06 16:03:42 -04:00
Cole Robinson
a773a66a3f virtcli: Export config variables in a class object
Makes things easier to extend later
2015-04-06 15:54:35 -04:00
Cole Robinson
1e2f605e81 virtcli: Drop custom version handling
No one uses it, and it can be handled easy enough with a wrapper script or
similar.
Message-Id: <1b33f161591b86407f78fb307aa4f89f6eee9e4e.1428346382.git.crobinso@redhat.com>
2015-04-06 15:54:35 -04:00
Guido Günther
a41e2c6f5a Add conversion file to migrate GConf values to GSettings
This makes sure we don't lose already configured connections.

Reference: http://bugs.debian.org/740047
2014-09-29 08:56:14 -04:00
Cole Robinson
5aafe008bc Remove virt-image, as scheduled
As promised with the last release, remove virt-image. In 6 months I didn't
hear a peep from any actual users that cared.
2014-09-06 18:05:43 -04:00
Roman Bogorodskiy
613d933d31 setup: drop obsolete virtconv/parsers data_files
Commit 0b4a72f dropped virtconv/parsers/ files, so remove
them from data_files list in setup.py as well.
2014-07-12 16:08:08 -04:00
Roman Bogorodskiy
05df5a6484 Add bhyve support
Allow connection to bhyve using bhyve:///system URI. That is
disabled by default and could be enabled using the new
configure option 'with-bhyve'.
2014-04-11 15:52:31 -04:00
Cole Robinson
a398d245cb Clean up pylint integration
- Drop no longer needed disable= bits
- Use string names for all skipped pylint messages
2014-04-02 19:00:24 -04:00