Commit Graph

69 Commits

Author SHA1 Message Date
Benjamin Dauvergne 6a6a2c06f0 add debian packaging 2016-03-25 23:11:15 +01:00
Jurko Gospodnetić 3ece6d16a0 make 'setup.py test' command support passing pytest specific arguments
Added a new 'setup.py test' command-line options --pytest-args/-a accepting all
pytest specific command-line arguments as a single whitespace separated string.

For example, the following command will run only tests containing ``binding`` in
their name, will stop on first failure and will automatically drop into Python's
post-mortem debugger on failure::

  setup.py test -a "-k binding -x --pdb"

Does not currently support passing pytest specific command-line arguments
containing embedded whitespace.
2014-05-31 13:58:17 +02:00
Jurko Gospodnetić 95e7b40d17 correct stylistic typo - remove trailing semicolon 2014-05-31 13:53:04 +02:00
Jurko Gospodnetić 9dd037a67f clean up the setup.py TestCommand command class
* made less reliant on its setuptools.command.test.test base class
* better commented its relationship with its base class
* no longer triggers its base setuptools test command's command-line option
processing
* no longer incorrectly reports supporting its base class's command-line options
* no longer incorrectly reports using the 'unittest' framework in its verbose
output
2014-05-31 13:51:26 +02:00
Jurko Gospodnetić e3b0a5d67c make 'setup.py test' collect tests outside the project's 'tests' folder 2014-05-31 13:35:15 +02:00
Jurko Gospodnetić 9bbc373837 avoid setup warnings when constructing a list of all project sources
Python 2 versions prior to some early 2.7.x release and Python 3 versions prior
to some 3.2.x release had buggy disutils implementations that can result in our
project's source distribution containing some extra unwanted files picked up
from some of our local 'tools/__*' cache folders. Such extra files are then
explicitly excluded by an explicit 'prune' rule in MANIFEST.in.

However, that can cause spurious warnings in case no such local cache folders
exist or no files have been collected from them. This commit works around the
issue in 2 stages:
 1. setup.py always creates one such dummy folder containing a single dummy file
    that is guaranteed to always be included on buggy implementations. This
    avoids the warning on buggy distutils implementations when no extra files
    have been collected.
 2. MANIFEST.in explicitly includes the dummy file created by setup.py. This
    avoids the warning on working distutils implementations which never collect
    any extra files by themselves.
2014-05-29 14:00:30 +02:00
Jurko Gospodnetić 438280d599 fix running tests using 'setup.py test' command with Python 2.4
Since the pytest & py packages we used to make our tests run on Python 2.4 are
not formally compatible, we must not explicitly specify pytest as a test
requirement or setuptools will go ahead and verify that all of its formally
specified requirements have been specified and fail.
2014-05-31 13:04:34 +02:00
Jurko Gospodnetić 34917137cc note benign 'setup.py test' error with colorama<0.1.11 & Python 2.5 on Windows 2014-05-26 13:43:27 +02:00
Jurko Gospodnetić 9e94620274 remove code duplication between setup.py & tools/setup_base_environments.py
Duplicate code extracted to new modules under the suds_devel package:
  - specifying the project's requirements - requirements.py
  - specifying the used setuptool install script - ez_setup_versioned.py

Updated todo list.
2014-05-26 13:04:24 +02:00
Jurko Gospodnetić a8ee9b16f9 fix slight end-user error message typo when running under Python 2 2014-05-23 11:24:41 +02:00
Jurko Gospodnetić 47bd3d9c61 clean up setup.py comment typos and style 2014-05-23 10:51:16 +02:00
Jurko Gospodnetić 1618ae351f reorganize tests - run on installed suds version + do not require py2to3
The test suite is no longer installed together with the project and can now be
run from the project's source distribution. This resolves the issue of the suds
test suite confusing users by getting installed as a top level tests package in
their Python environment.

Project to be tested now need to be explicitly installed prior to running its
tests using pytest, except in case of Python 2 tests being run from the top
level project folder. This requires the user to install the project (suggested
way is to install it in editable mode using 'pip install -e') but also allows
him to run the tests on other non-sandbox project versions, e.g. an externally
installed version.

Project testing now requires the six Python 2/3 compatibility support package
(installed automatically, together with other test requirements).
Test support code now moved to a separate testutils package located under the
tests folder.
Updated project README.rst & HACKING.rst docs.
Minor stylistic changes.
2014-05-17 14:08:18 +02:00
Jurko Gospodnetić 1f02bc652b fix KeyboardInterrupt & SetupExit handling in setup.py
There were several occurrences in code where such exceptions could have been
gobbled up when running under Python 2.4.x.
2014-05-16 23:29:51 +02:00
Jurko Gospodnetić a3866610cc make setup.py install correctly into Windows Python 2.5 environments
Before it did not take care of which colorama package (pytest prerequisite) got
installed into such environments, which could cause it to install an
incompatible one.

Code lifted from the tools/setup_basic_environments.py script and this code
duplication should be removed in the future.
2014-05-16 22:10:42 +02:00
Jurko Gospodnetić d41b8f1b8e clean up setup.py code a bit 2014-05-16 22:07:36 +02:00
Jurko Gospodnetić cd35f9e29f make setup.py header comment consistent with other utf-8 encoded modules
In all other suds project's utf-8 encoded modules, the coding comment is
separated from the copyright comment with a single empty line.
2014-05-14 14:45:37 +02:00
Jurko Gospodnetić 84dde1de8e fix error reported after running 'setup.py test' on Python 3.1 2014-05-14 12:19:48 +02:00
Jurko Gospodnetić f24e81523b store correct maintainer name in PKG-INFO meta data where possible
Python [3.0, 3.2.2> distutils implementation writes package meta-data using
the user's local environment encoding instead of UTF-8. Since the maintainer's
name contains a non-ASCII character - this can cause problems if the user's
local encoding does not support it. In order to avoid such issues, we convert
the name to a similar ASCII-character-only variant, but now we do so only when
using such older Python 3.x releases.
2014-05-12 15:03:41 +02:00
Jurko Gospodnetić 9f408bb855 clean up minor stylistic coding detail in setup.py 2014-05-12 14:54:33 +02:00
Jurko Gospodnetić f6c7780fce fix installation on Python 3.1 - work around inspect.getmodule() failing
Python 3.x versions prior to Python 3.2.3 have a bug in their inspect module
causing inspect.getmodule() calls to fail if some module lazy loads other
modules when some of its attributes are accessed. For more detailed information
see Python development issue #13487 (http://bugs.python.org/issue13487).

This occurs when using setuptools to install our project into a Python 3.1
environment. There py.error module seems to do such lazy loading which we force
done here before the setuptools installation procedure to avoid the issue.
2014-05-12 14:51:59 +02:00
Jurko Gospodnetić 76e1e4e124 fix installation on Python 3.1 - disable automated setuptools installation
Since one of setuptools project's test modules contains a UTF-8 BOM, it will
fail to install cleanly on Python versions [3.0 - 3.2> where the py2to3 tool
will not know how to process such files. 'setuptools' can still be installed by
running its ez_setup.py installation script manually (this will report and
ignore the py2to3 error), but attempting to install it using the
ez_setup.use_setuptools() function causes our whole setup to fail.

An embedded code comment explains how this workaround can be further improved,
should anyone feel so inclined, but for now, we simply report a warning and
instruct the user to install setuptool manually if needed.
2014-05-12 14:48:09 +02:00
Jurko Gospodnetić 8dfe54fd14 mark Python 3.0 minor release as an unsupported Python version
Added relevant HACKING docs.
setup.py now exits with a clean error message when run using Python 3.0.
Python 3.0 removed from a list of supported Python versions stored in the
project's meta-data.
2014-05-04 22:18:22 +02:00
Jurko Gospodnetić ebb560406d remove the strict setup.py --> setuptools dependency
setup.py will now attempt to use setuptools if available (there is no version
check for preinstalled setuptools), and if not - attempts to install its own
tested setuptools version after downloading it from PyPI. If all attempts to
use setuptools fail, setup.py will fall back on using distutils with a bit
reduced functionality.

See extensive in-code comments for more detailed information on all the
setuptools related functionality, as well as the rationale behind choosing the
current setuptools usage design.
2014-04-26 19:21:50 +02:00
Jurko Gospodnetić 4d5ff7f626 improve setup.py test command
- now works correctly even on Python 2.4.x where it needs to be careful about
  what exact pytest and py library versions it needs to install
- if setup.py test command can not be used, it now reports the reason as its
  description (displayed using 'setup.py --help-commands') and as a clear
  end-user error message when run
- improved the setup.py test command description when used on Python 3+
2014-04-26 19:10:27 +02:00
Jurko Gospodnetić b6274ace9a implement a replacement for setuptools.find_packages()
Part of the work to reduce the setup.py --> setuptools dependency.
2014-04-26 18:47:27 +02:00
Jurko Gospodnetić 11068780f7 inline pkg_resources.safe_version() to reduce setup.py setuptools dependency 2014-04-26 18:45:05 +02:00
Jurko Gospodnetić dae52c77da make setup.py exit with a clean error message if run using Python prior to 2.4 2014-04-26 18:42:49 +02:00
Jurko Gospodnetić 46dc33aa44 stylistic setup.py cleanup
- split up the implementation into separate & commented sections
- improved internal implementation comments including the main module docstring
- updated the documented module author
- converted to UTF-8 encoding
- lots of minor stylistic changes
2014-04-26 18:41:34 +02:00
Jurko Gospodnetić ac23dfbbd7 use the latest compatible setuptools version for the current Python version
Now using setuptools 1.4.2 with Python 2.4 & 2.5, and using setuptools 3.3 with
later Python versions. This should help avoid installation issues in different
exotic use cases that were once not being handled by setuptools but have since
been corrected.
2014-03-23 18:39:23 +01:00
Jurko Gospodnetić 32afd327a1 mark the project as compatible with Python 3.4 2014-03-23 18:23:01 +01:00
Jurko Gospodnetić 68c0b78828 clean up the setup.py module comments - stylistic changes 2014-03-04 21:19:31 +01:00
Jurko Gospodnetić 05e8ff0a2d update documented project links to use HTTP instead of HTTPS protocol 2013-12-02 21:07:40 +01:00
Jurko Gospodnetić f86b7e1ebe wrap package setup's long_description field to 72 characters
As noted in an already existing comment, PKG_INFO package distribution metadata
file stores this text with an 8 space indentation and therefore should not be
longer than 72 characters.
2013-12-02 21:06:50 +01:00
Jurko Gospodnetić 8d2fd5f19c revert setup workaround for Python 2.4.3 not supporting HTTPS downloads
PyPI started using HTTPS links on all of its package index pages. Therefore,
there is no longer any simple way to make our setup install its requirement
packages automatically from it unless Python actually supports HTTPS downloads.
2013-12-02 21:04:40 +01:00
Jurko Gospodnetić 427f5dfecc fix setup to work with soft links in the current working folder path
Contributed by ryanpetrello.
2013-11-30 11:19:42 +01:00
Jurko Gospodnetić 3e3b408442 Setup script support for running the pytest based test suite.
May run only the basic test suite, as distutils does not support passing on
arbitrary command-line arguments to its commands. For more detailed control,
user still needs to run the test suite directly using pytest.

Allows running the test suit using Python 3 without first having to install the
whole package.

Regular package distribution now includes the test code. This is required in
order to have the distutils 'test' command be able to do a temporary build when
asked to run the project's test suite using Python 3 (needed in order to run
py2to3 on the project's code base).
2013-06-18 19:32:08 +02:00
Jurko Gospodnetić ebfb9f422f Setup code cleanup - minor stylistic change. 2013-06-18 17:02:18 +02:00
Jurko Gospodnetić 07c16b0358 Marked the project as Python 3.3 compatible. 2013-06-18 13:02:13 +02:00
Jurko Gospodnetić 047891954d Setup workaround for HTTPS download problem with Python 2.4.3. 2013-06-18 13:01:51 +02:00
Jurko Gospodnetić dfd8340090 Setup no longer uses an unknown 'obsoletes' parameter with Python 2.4. 2013-06-18 13:00:55 +02:00
Jurko Gospodnetić 403e2e95c7 Setup script cleanup - typo correction & minor stylistic change. 2013-06-18 12:57:30 +02:00
Jurko Gospodnetić daaf7dfdc6 Updated setup to use setuptools 0.7.2 instead of the distribute package.
Suitable setuptools version now downloaded & installed from PyPI
automatically if one is not already detected in the environment.
2013-06-18 12:39:53 +02:00
Jurko Gospodnetić 1a6204cacb Merged README related changes from Phillip Alday.
README.txt file converted to RST format, but renamed instead of deleted/readded
in order to preserve its history. Minor stylistic changes made to it in the
process.

Reverted setup.py changes other than cleaning up line endings, as they were all
version information related.

Reverted external tag information to avoid versioning confusion between the two
forks. Hopefully, they can get merged in some near future, but for now, having
0.4.1 suds-jurko & 0.4.2 suds-palday tags in the same repository seems like just
asking for accidents to happen.
2013-03-01 16:18:42 +01:00
Jurko Gospodnetić bbdc621970 Improved setup procedure support for Python versions below 2.5.
Python versions prior to 2.5 did not support the string format() member
function.
2013-02-28 21:10:32 +01:00
Jurko Gospodnetić 502a6d0154 Improved setup procedure support for Python versions below 2.6.
If 'suds/version.py' project file contains Windows new-lines, reading it during
the package setup procedure would fail on non-Windows platforms.
2013-02-28 20:47:25 +01:00
Phillip Alday 62bf3e0a24 More work on README (especially formatting); updated some information in setup.py 2012-05-16 17:45:36 +02:00
Phillip Alday eceb36e908 Fixed issue with encoding of authentication in transport/http.py. Updated setup and version scripts, including removing the use of jurko tag in name and version number. The name needs to remain suds so that all setup scripts recognize the suds dependency correctly. Bumped version to 0.4.2 and start using build tag. 2012-05-16 12:15:49 +02:00
Jurko Gospodnetić c46729d733 Minor stylistic comment change. 2012-04-17 12:51:15 +02:00
Jurko Gospodnetić 5a5882bcda Package maintainer string no longer contains non-ASCII characters.
Such characters were causing problems with the 'distribute' based setup
procedure which erroneously assumes they have been prepared using the user's
local code-page.
2012-04-17 12:49:36 +02:00
Jurko Gospodnetić 8ab1d055f5 Made the long_description project metadata more detailed. 2011-12-25 00:13:48 +01:00