-
Notifications
You must be signed in to change notification settings - Fork 26
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
Fixes #832, #26: Use pbr+req files; Add min/max pkg levels; Fix OS-X runs; Other improvements #857
Conversation
280edda
to
7e3a2ff
Compare
7e3a2ff
to
6dec9ee
Compare
ce92e9f
to
409710c
Compare
409710c
to
bd0d4f2
Compare
f9577b0
to
7c6af65
Compare
25cd174
to
dd78b5f
Compare
8bf4596
to
79778e4
Compare
@KSchopmeyer Karl, this PR is now ready for re-review. Please read the original comment at the top of the PR for details. Also, please double check whether the error you reported further up in this PR can be reproduced with the latest level. |
79778e4
to
88cd30e
Compare
…vements This change contains a number of related changes. Details for using pbr+req files: - Migrated installation and development setup to use the `pbr` package and Pip requirements files. Package metadata is now defined in `setup.cfg`, and `setup.py` has been reduced to only delegate to `pbr`. Added several Pip requirements files (named `*requirements.txt`). - Changed `pywbem/_version.py` and the `makefile` to determine the pywbem package version from `pbr`. - Added the capability to `pywbem_os_setup.sh` to install OS-level packages needed for development of pywbem and installed the `libxml2` package that way (needed to provide the `xmllint` utility used by the tests). - Fixed the install section of the documentation to add the need for the `libxml2` package when developing pywbem. - Narrowed the quickfix for symlinking the OpenSSL header files in `.travis.yml` to just be done when on Linux and with Python 2.6. - Reorganized the make targets for installing packages. New targets `install_os` and `develop_os` install OS-level prereq packages for runtime and development, respectively. These targets are also included in the `install` and `develop` targets when invoked for the first time after a `make clobber`. - The installation of the M2CryptoWin32/64 Python packages on Windows has been automated in the Appveyor CI, but could not be automated for users of Pywbem, because it is not currently possible to use the bit size of the Python executable as a condition (=marker) in Pip requirements files. Updated the install documentation accordingly, with a manual step to be performed when installing on Windows. Added diagnostics prints to the makefile comparing different ways to determine the bit size of the Python executable in Python (There were several methods discussed on StackOverflow). - Removed files that are no longer used after these changes: `os_setup.py`, `uninstall_pbr_on_py26.py`. - Added a new script `remove_duplicate_setuptools.py` to circumvent the issue 'ImportError: No module named build_clib'i on Travis CI. The script fixes a setup error on Travis CI by removing a duplicate metadata directory for the Python `setuptools` package. This issue came up only now because we switched to using `pbr`. - Pinned M2Crypto to != 0.27.0 to fix dependency issue on Python 2.6 where M2Crypto requires `unittest2==0.5.1`. This is in conflict with the pywbem requirements files specifying `unittest2>=1.1.0`. See M2Crypto issue #195. - Fixed an error in `tox.ini` when called with the `pywin` environment for Windows from the Appveyor CI, where not all required environment variables were passed through to `make`. - With the use of `pbr`, the development version for the upcoming 0.12.0 version changed from `0.12.0.dev0` to `0.11.1.devNNN`. Therefore, needed to adjust the check for the 0.12.0 variant of tests in `test_cim_obj.py` from comparing `>=0.12.0` to comparing `>0.11.0`. Details for testing min/max pkg levels: - Because requirements files are now used, it was easy to also add the ability to install the dependent Python packages with either their latest level from Pypi, or with a defined minimum level, by using a Pip constraints file (`minimum-constraints.txt`). This is controlled by the environment variable PACKAGE_LEVEL, which can be set to `minimum` or `latest` (default). - The Travis CI and Appveyor CI are now set up to test both package levels. In this commit, all combinations of platforms, Python versions, and package levels have been defined, but only a small subset is active - the others are commented out. Enabling all of them is left to other branches. Details for fixing OS-X runs: - Extended the OS-X combinations in `.travis.yml` to reflect mininum and latest package levels. Note that in this commit, the `.travis.yml` file continues to have all OS-X combinations commented out; it is left to other branches to enable them. - Fixed the environment variables for the OpenSSL development files that were set in `.travis.yml` for OS-X. - Fixed the issue that for OS-X, the virtualenv directory was in the pywbem working directory which caused tests from the installed packages to be run by py.test (and some of them failed). - Added support to `pywbem_os_setup.sh` for automatically installing OS-level packages for OS-X, using Homebrew (the `brew` command). Details for other improvements: - Consolidated the invocation of make runs in `.travis.yml`, `tox.ini` and `appveyor.yaml` to be consistent. Now we are issuing 'make install' first to check whether it has all dependencies for runtime (and that not some of them are in the development dependencies by accident). As part of that, added an import test 'import pywbem' to 'make install' to check for importability. - Improved `makefile` and `pywbem_os_setup.sh` to always have a message prefix indicating the source of the message, and to let error and warning messages go to stderr. - Reordered the virtual targets in the `makefile` to be consistent with the order shown in the `help` target. - Added additional messages in the makefile to better allow tracing which target caused the commands to be executed. - Some of the OS-level packages are needed only to install or run M2Crypto. nevertheless, they had been installed on Python 2 and Python 3. Now, they are only installed when running on Python 2 (M2Crypto is not used by pywbem when running on Python 3). - Moved the install actions into separate functions in `pywbem_os_setup.sh`. Signed-off-by: Andreas Maier <maiera@de.ibm.com>
88cd30e
to
82863b5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to work with this for another couple of hours before approving
Karl agrees. Lets check this in |
Ready for review and merge. For details, see commit message.
Sorry for accumulating a number of things in this PR, but they were all related. I have split out some changes that ended up being unrelated, into separate PRs (#861 and #862). The commit message of this PR here has carefully been edited to reflect all changes. So one way of simplifying the review would be to review the changes as described by the comment message and to go to the actual file changes only very partially.
The Travis CI runs for OS-X have been disabled again in this PR in order to keep the CI runs quick for PRs; the OS-X runs can be seen in PR #791 which has been rebased on this PR and has OS-X enabled.