[Python-modules-commits] [lazy-object-proxy] 01/04: import (by hand) lazy-object-proxy_1.2.1.orig.tar.gz

Sandro Tosi morph at moszumanska.debian.org
Sat Dec 5 23:08:06 UTC 2015


This is an automated email from the git hooks/post-receive script.

morph pushed a commit to branch master
in repository lazy-object-proxy.

commit eb1c2250d3d9258836b611a626982fcf4ed07019
Author: Sandro Tosi <morph at debian.org>
Date:   Sat Dec 5 22:53:53 2015 +0000

    import (by hand) lazy-object-proxy_1.2.1.orig.tar.gz
---
 .cookiecutterrc                                    |   29 +
 .coveragerc                                        |   12 +
 .travis.yml                                        |   33 +
 AUTHORS.rst                                        |    5 +
 CHANGELOG.rst                                      |   27 +
 CONTRIBUTING.rst                                   |   89 +
 LICENSE                                            |   19 +
 MANIFEST.in                                        |   21 +
 PKG-INFO                                           |  147 ++
 README.rst                                         |   94 +
 appveyor.yml                                       |   97 +
 ci/appveyor-bootstrap.ps1                          |   88 +
 ci/appveyor-with-compiler.cmd                      |   37 +
 ci/bootstrap.py                                    |   64 +
 ci/templates/.travis.yml                           |   27 +
 ci/templates/appveyor.yml                          |   39 +
 ci/templates/tox.ini                               |  140 ++
 docs/authors.rst                                   |    1 +
 docs/changelog.rst                                 |    1 +
 docs/conf.py                                       |   43 +
 docs/contributing.rst                              |    1 +
 docs/index.rst                                     |   23 +
 docs/installation.rst                              |    7 +
 docs/readme.rst                                    |    5 +
 docs/reference/index.rst                           |    7 +
 docs/reference/lazy_object_proxy.rst               |    5 +
 docs/requirements.txt                              |    4 +
 docs/spelling_wordlist.txt                         |   11 +
 docs/usage.rst                                     |    7 +
 setup.cfg                                          |   72 +
 setup.py                                           |  115 ++
 src/lazy_object_proxy.egg-info/PKG-INFO            |  147 ++
 src/lazy_object_proxy.egg-info/SOURCES.txt         |   44 +
 .../dependency_links.txt                           |    1 +
 src/lazy_object_proxy.egg-info/not-zip-safe        |    1 +
 src/lazy_object_proxy.egg-info/top_level.txt       |    1 +
 src/lazy_object_proxy/__init__.py                  |   20 +
 src/lazy_object_proxy/cext.c                       | 1421 +++++++++++++++
 src/lazy_object_proxy/compat.py                    |    9 +
 src/lazy_object_proxy/simple.py                    |  246 +++
 src/lazy_object_proxy/slots.py                     |  414 +++++
 src/lazy_object_proxy/utils.py                     |   13 +
 tests/compat.py                                    |   27 +
 tests/test_lazy_object_proxy.py                    | 1904 ++++++++++++++++++++
 tox.ini                                            |  218 +++
 45 files changed, 5736 insertions(+)

diff --git a/.cookiecutterrc b/.cookiecutterrc
new file mode 100644
index 0000000..a98746c
--- /dev/null
+++ b/.cookiecutterrc
@@ -0,0 +1,29 @@
+# This file exists so you can easily regenerate your project.
+#
+# Unfortunatelly cookiecutter can't use this right away so
+# you have to copy this file to ~/.cookiecutterrc
+
+default_context:
+
+    c_extension_optional:      'yes'
+    c_extension_support:       'yes'
+    codecov:                   'yes'
+    command_line_interface:    'no'
+    coveralls:                 'yes'
+    distribution_name:         'lazy-object-proxy'
+    email:                     'contact at ionelmc.ro'
+    full_name:                 'Ionel Cristian Mărieș'
+    github_username:           'ionelmc'
+    landscape:                 'yes'
+    package_name:              'lazy_object_proxy'
+    project_name:              'lazy-object-proxy'
+    project_short_description: 'A fast and thorough lazy object proxy.'
+    release_date:              '2015-04-11'
+    repo_name:                 'python-lazy-object-proxy'
+    scrutinizer:               'yes'
+    sphinx_theme:              'sphinx-py3doc-enhanced-theme'
+    test_matrix_configurator:  'yes'
+    test_runner:               'pytest'
+    version:                   '1.0.2'
+    website:                   'http://blog.ionelmc.ro'
+    year:                      '2014-2015'
diff --git a/.coveragerc b/.coveragerc
new file mode 100644
index 0000000..772866d
--- /dev/null
+++ b/.coveragerc
@@ -0,0 +1,12 @@
+[paths]
+source = src
+
+[run]
+branch = True
+source = src
+parallel = true
+
+[report]
+show_missing = true
+precision = 2
+omit = *migrations*
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..6e52d4b
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,33 @@
+language: python
+python: 2.7
+sudo: false
+env:
+  global:
+    LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
+  matrix:
+    - TOXENV=check
+    - TOXENV=2.6,extension-coveralls,coveralls,codecov
+    - TOXENV=2.6-nocover
+    - TOXENV=2.7,extension-coveralls,coveralls,codecov
+    - TOXENV=2.7-nocover
+    - TOXENV=3.3,extension-coveralls,coveralls,codecov
+    - TOXENV=3.3-nocover
+    - TOXENV=3.4,extension-coveralls,coveralls,codecov
+    - TOXENV=3.4-nocover
+    - TOXENV=pypy,extension-coveralls,coveralls,codecov
+    - TOXENV=pypy-nocover
+before_install:
+  - python --version
+  - virtualenv --version
+  - pip --version
+  - uname -a
+  - lsb_release -a
+install:
+  - pip install tox
+script:
+  - tox -v
+notifications:
+  email:
+    on_success: never
+    on_failure: always
+
diff --git a/AUTHORS.rst b/AUTHORS.rst
new file mode 100644
index 0000000..0e54887
--- /dev/null
+++ b/AUTHORS.rst
@@ -0,0 +1,5 @@
+
+Authors
+=======
+
+* Ionel Cristian Mărieș - http://blog.ionelmc.ro
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
new file mode 100644
index 0000000..4ebc615
--- /dev/null
+++ b/CHANGELOG.rst
@@ -0,0 +1,27 @@
+
+Changelog
+=========
+
+1.2.1 (2015-08-18)
+------------------
+
+* Fix a memory leak (the wrapped object would get bogus references). Contributed by Astrum Kuo in
+  `#10 <https://github.com/ionelmc/python-lazy-object-proxy/pull/10>`_.
+
+1.2.0 (2015-07-06)
+------------------
+
+* Don't instantiate the object when __repr__ is called. This aids with debugging (allows one to see exactly in
+  what state the proxy is).
+
+1.1.0 (2015-07-05)
+------------------
+
+* Added support for pickling. The pickled value is going to be the wrapped object *without* any Proxy container.
+* Fixed a memory management issue in the C extension (reference cycles weren't garbage collected due to improper
+  handling in the C extension).
+
+1.0.2 (2015-04-11)
+-----------------------------------------
+
+* First release on PyPI.
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
new file mode 100644
index 0000000..2e1bb7b
--- /dev/null
+++ b/CONTRIBUTING.rst
@@ -0,0 +1,89 @@
+============
+Contributing
+============
+
+Contributions are welcome, and they are greatly appreciated! Every
+little bit helps, and credit will always be given.
+
+Bug reports
+===========
+
+When `reporting a bug <https://github.com/ionelmc/python-lazy-object-proxy/issues>`_ please include:
+
+    * Your operating system name and version.
+    * Any details about your local setup that might be helpful in troubleshooting.
+    * Detailed steps to reproduce the bug.
+
+Documentation improvements
+==========================
+
+lazy-object-proxy could always use more documentation, whether as part of the
+official lazy-object-proxy docs, in docstrings, or even on the web in blog posts,
+articles, and such.
+
+Feature requests and feedback
+=============================
+
+The best way to send feedback is to file an issue at https://github.com/ionelmc/python-lazy-object-proxy/issues.
+
+If you are proposing a feature:
+
+* Explain in detail how it would work.
+* Keep the scope as narrow as possible, to make it easier to implement.
+* Remember that this is a volunteer-driven project, and that contributions are welcome :)
+
+Development
+===========
+
+To set up `python-lazy-object-proxy` for local development:
+
+1. `Fork python-lazy-object-proxy on GitHub <https://github.com/ionelmc/python-lazy-object-proxy/fork>`_.
+2. Clone your fork locally::
+
+    git clone git at github.com:your_name_here/python-lazy-object-proxy.git
+
+3. Create a branch for local development::
+
+    git checkout -b name-of-your-bugfix-or-feature
+
+   Now you can make your changes locally.
+
+4. When you're done making changes, run all the checks, doc builder and spell checker with `tox <http://tox.readthedocs.org/en/latest/install.html>`_ one command::
+
+    tox
+
+5. Commit your changes and push your branch to GitHub::
+
+    git add .
+    git commit -m "Your detailed description of your changes."
+    git push origin name-of-your-bugfix-or-feature
+
+6. Submit a pull request through the GitHub website.
+
+Pull Request Guidelines
+-----------------------
+
+If you need some code review or feedback while you're developing the code just make the pull request.
+
+For merging, you should:
+
+1. Include passing tests (run ``tox``) [1]_.
+2. Update documentation when there's new API, functionality etc. 
+3. Add a note to ``CHANGELOG.rst`` about the changes.
+4. Add yourself to ``AUTHORS.rst``.
+
+.. [1] If you don't have all the necessary python versions available locally you can rely on Travis - it will 
+       `run the tests <https://travis-ci.org/ionelmc/python-lazy-object-proxy/pull_requests>`_ for each change you add in the pull request.
+       
+       It will be slower though ...
+       
+Tips
+----
+
+To run a subset of tests::
+
+    tox -e envname -- py.test -k test_myfeature
+
+To run all the test environments in *parallel* (you need to ``pip install detox``)::
+
+    detox
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..0209986
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2014-2015, Ionel Cristian Mărieș
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
+disclaimer in the documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..33a4802
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,21 @@
+graft docs
+graft examples
+graft src
+graft ci
+graft tests
+
+include .bumpversion.cfg
+include .coveragerc
+include .cookiecutterrc
+include .isort.cfg
+include .pylintrc
+
+include AUTHORS.rst
+include CHANGELOG.rst
+include CONTRIBUTING.rst
+include LICENSE
+include README.rst
+
+include tox.ini .travis.yml appveyor.yml
+
+global-exclude *.py[cod] __pycache__ *.so
diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644
index 0000000..3971fc0
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,147 @@
+Metadata-Version: 1.1
+Name: lazy-object-proxy
+Version: 1.2.1
+Summary: A fast and thorough lazy object proxy.
+Home-page: https://github.com/ionelmc/python-lazy-object-proxy
+Author: Ionel Cristian Mărieș
+Author-email: contact at ionelmc.ro
+License: BSD
+Description: ===============================
+        lazy-object-proxy
+        ===============================
+        
+        .. list-table::
+            :stub-columns: 1
+        
+            * - docs
+              - |docs|
+            * - tests
+              - | |travis| |appveyor|
+                | |coveralls| |codecov| |landscape| |scrutinizer|
+            * - package
+              - |version| |downloads|
+        
+        ..
+            |wheel| |supported-versions| |supported-implementations|
+        
+        .. |docs| image:: https://readthedocs.org/projects/python-lazy-object-proxy/badge/?style=flat
+            :target: https://readthedocs.org/projects/python-lazy-object-proxy
+            :alt: Documentation Status
+        
+        .. |travis| image:: http://img.shields.io/travis/ionelmc/python-lazy-object-proxy/master.svg?style=flat&label=Travis
+            :alt: Travis-CI Build Status
+            :target: https://travis-ci.org/ionelmc/python-lazy-object-proxy
+        
+        .. |appveyor| image:: https://img.shields.io/appveyor/ci/ionelmc/python-lazy-object-proxy/master.svg?style=flat&label=AppVeyor
+            :alt: AppVeyor Build Status
+            :target: https://ci.appveyor.com/project/ionelmc/python-lazy-object-proxy
+        
+        .. |coveralls| image:: http://img.shields.io/coveralls/ionelmc/python-lazy-object-proxy/master.svg?style=flat&label=Coveralls
+            :alt: Coverage Status
+            :target: https://coveralls.io/r/ionelmc/python-lazy-object-proxy
+        
+        .. |codecov| image:: http://img.shields.io/codecov/c/github/ionelmc/python-lazy-object-proxy/master.svg?style=flat&label=Codecov
+            :alt: Coverage Status
+            :target: https://codecov.io/github/ionelmc/python-lazy-object-proxy
+        
+        .. |landscape| image:: https://landscape.io/github/ionelmc/python-lazy-object-proxy/master/landscape.svg?style=flat
+            :target: https://landscape.io/github/ionelmc/python-lazy-object-proxy/master
+            :alt: Code Quality Status
+        
+        .. |version| image:: http://img.shields.io/pypi/v/lazy-object-proxy.svg?style=flat
+            :alt: PyPI Package latest release
+            :target: https://pypi.python.org/pypi/lazy-object-proxy
+        
+        .. |downloads| image:: http://img.shields.io/pypi/dm/lazy-object-proxy.svg?style=flat
+            :alt: PyPI Package monthly downloads
+            :target: https://pypi.python.org/pypi/lazy-object-proxy
+        
+        .. |wheel| image:: https://pypip.in/wheel/lazy-object-proxy/badge.svg?style=flat
+            :alt: PyPI Wheel
+            :target: https://pypi.python.org/pypi/lazy-object-proxy
+        
+        .. |supported-versions| image:: https://pypip.in/py_versions/lazy-object-proxy/badge.svg?style=flat
+            :alt: Supported versions
+            :target: https://pypi.python.org/pypi/lazy-object-proxy
+        
+        .. |supported-implementations| image:: https://pypip.in/implementation/lazy-object-proxy/badge.svg?style=flat
+            :alt: Supported implementations
+            :target: https://pypi.python.org/pypi/lazy-object-proxy
+        
+        .. |scrutinizer| image:: https://img.shields.io/scrutinizer/g/ionelmc/python-lazy-object-proxy/master.svg?style=flat
+            :alt: Scrutinizer Status
+            :target: https://scrutinizer-ci.com/g/ionelmc/python-lazy-object-proxy/
+        
+        A fast and thorough lazy object proxy.
+        
+        * Free software: BSD license
+        
+        Installation
+        ============
+        
+        ::
+        
+            pip install lazy-object-proxy
+        
+        Documentation
+        =============
+        
+        https://python-lazy-object-proxy.readthedocs.org/
+        
+        Development
+        ===========
+        
+        To run the all tests run::
+        
+            tox
+        
+        Acknowledgements
+        ================
+        
+        This project is based on some code from `wrapt <https://github.com/GrahamDumpleton/wrapt>`_
+        as you can see in the git history.
+        
+        
+        Changelog
+        =========
+        
+        1.2.1 (2015-08-18)
+        ------------------
+        
+        * Fix a memory leak (the wrapped object would get bogus references). Contributed by Astrum Kuo in
+          `#10 <https://github.com/ionelmc/python-lazy-object-proxy/pull/10>`_.
+        
+        1.2.0 (2015-07-06)
+        ------------------
+        
+        * Don't instantiate the object when __repr__ is called. This aids with debugging (allows one to see exactly in
+          what state the proxy is).
+        
+        1.1.0 (2015-07-05)
+        ------------------
+        
+        * Added support for pickling. The pickled value is going to be the wrapped object *without* any Proxy container.
+        * Fixed a memory management issue in the C extension (reference cycles weren't garbage collected due to improper
+          handling in the C extension).
+        
+        1.0.2 (2015-04-11)
+        -----------------------------------------
+        
+        * First release on PyPI.
+        
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Operating System :: Unix
+Classifier: Operating System :: POSIX
+Classifier: Operating System :: Microsoft :: Windows
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
+Classifier: Topic :: Utilities
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..f74c9db
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,94 @@
+===============================
+lazy-object-proxy
+===============================
+
+.. list-table::
+    :stub-columns: 1
+
+    * - docs
+      - |docs|
+    * - tests
+      - | |travis| |appveyor|
+        | |coveralls| |codecov| |landscape| |scrutinizer|
+    * - package
+      - |version| |downloads|
+
+..
+    |wheel| |supported-versions| |supported-implementations|
+
+.. |docs| image:: https://readthedocs.org/projects/python-lazy-object-proxy/badge/?style=flat
+    :target: https://readthedocs.org/projects/python-lazy-object-proxy
+    :alt: Documentation Status
+
+.. |travis| image:: http://img.shields.io/travis/ionelmc/python-lazy-object-proxy/master.svg?style=flat&label=Travis
+    :alt: Travis-CI Build Status
+    :target: https://travis-ci.org/ionelmc/python-lazy-object-proxy
+
+.. |appveyor| image:: https://img.shields.io/appveyor/ci/ionelmc/python-lazy-object-proxy/master.svg?style=flat&label=AppVeyor
+    :alt: AppVeyor Build Status
+    :target: https://ci.appveyor.com/project/ionelmc/python-lazy-object-proxy
+
+.. |coveralls| image:: http://img.shields.io/coveralls/ionelmc/python-lazy-object-proxy/master.svg?style=flat&label=Coveralls
+    :alt: Coverage Status
+    :target: https://coveralls.io/r/ionelmc/python-lazy-object-proxy
+
+.. |codecov| image:: http://img.shields.io/codecov/c/github/ionelmc/python-lazy-object-proxy/master.svg?style=flat&label=Codecov
+    :alt: Coverage Status
+    :target: https://codecov.io/github/ionelmc/python-lazy-object-proxy
+
+.. |landscape| image:: https://landscape.io/github/ionelmc/python-lazy-object-proxy/master/landscape.svg?style=flat
+    :target: https://landscape.io/github/ionelmc/python-lazy-object-proxy/master
+    :alt: Code Quality Status
+
+.. |version| image:: http://img.shields.io/pypi/v/lazy-object-proxy.svg?style=flat
+    :alt: PyPI Package latest release
+    :target: https://pypi.python.org/pypi/lazy-object-proxy
+
+.. |downloads| image:: http://img.shields.io/pypi/dm/lazy-object-proxy.svg?style=flat
+    :alt: PyPI Package monthly downloads
+    :target: https://pypi.python.org/pypi/lazy-object-proxy
+
+.. |wheel| image:: https://pypip.in/wheel/lazy-object-proxy/badge.svg?style=flat
+    :alt: PyPI Wheel
+    :target: https://pypi.python.org/pypi/lazy-object-proxy
+
+.. |supported-versions| image:: https://pypip.in/py_versions/lazy-object-proxy/badge.svg?style=flat
+    :alt: Supported versions
+    :target: https://pypi.python.org/pypi/lazy-object-proxy
+
+.. |supported-implementations| image:: https://pypip.in/implementation/lazy-object-proxy/badge.svg?style=flat
+    :alt: Supported implementations
+    :target: https://pypi.python.org/pypi/lazy-object-proxy
+
+.. |scrutinizer| image:: https://img.shields.io/scrutinizer/g/ionelmc/python-lazy-object-proxy/master.svg?style=flat
+    :alt: Scrutinizer Status
+    :target: https://scrutinizer-ci.com/g/ionelmc/python-lazy-object-proxy/
+
+A fast and thorough lazy object proxy.
+
+* Free software: BSD license
+
+Installation
+============
+
+::
+
+    pip install lazy-object-proxy
+
+Documentation
+=============
+
+https://python-lazy-object-proxy.readthedocs.org/
+
+Development
+===========
+
+To run the all tests run::
+
+    tox
+
+Acknowledgements
+================
+
+This project is based on some code from `wrapt <https://github.com/GrahamDumpleton/wrapt>`_
+as you can see in the git history.
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 0000000..76a695f
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,97 @@
+version: '{branch}-{build}'
+build: off
+environment:
+  global:
+    WITH_COMPILER: "cmd /E:ON /V:ON /C .\\ci\\appveyor-with-compiler.cmd"
+  matrix:
+    - TOXENV: check
+      PYTHON_HOME: "C:\\Python27"
+      PYTHON_VERSION: "2.7"
+      PYTHON_ARCH: "32"
+    - TOXENV: "2.7"
+      TOXPYTHON: "C:\\Python27\\python.exe"
+      WINDOWS_SDK_VERSION: "v7.0"
+      PYTHON_HOME: "C:\\Python27"
+      PYTHON_VERSION: "2.7"
+      PYTHON_ARCH: "32"
+    - TOXENV: "2.7"
+      TOXPYTHON: "C:\\Python27-x64\\python.exe"
+      WINDOWS_SDK_VERSION: "v7.0"
+      PYTHON_HOME: "C:\\Python27-x64"
+      PYTHON_VERSION: "2.7"
+      PYTHON_ARCH: "64"
+    - TOXENV: "2.7-nocover"
+      TOXPYTHON: "C:\\Python27\\python.exe"
+      WINDOWS_SDK_VERSION: "v7.0"
+      PYTHON_HOME: "C:\\Python27"
+      PYTHON_VERSION: "2.7"
+      PYTHON_ARCH: "32"
+    - TOXENV: "2.7-nocover"
+      TOXPYTHON: "C:\\Python27-x64\\python.exe"
+      WINDOWS_SDK_VERSION: "v7.0"
+      PYTHON_HOME: "C:\\Python27-x64"
+      PYTHON_VERSION: "2.7"
+      PYTHON_ARCH: "64"
+    - TOXENV: "3.3"
+      TOXPYTHON: "C:\\Python33\\python.exe"
+      WINDOWS_SDK_VERSION: "v7.1"
+      PYTHON_HOME: "C:\\Python33"
+      PYTHON_VERSION: "3.3"
+      PYTHON_ARCH: "32"
+    - TOXENV: "3.3"
+      TOXPYTHON: "C:\\Python33-x64\\python.exe"
+      WINDOWS_SDK_VERSION: "v7.1"
+      PYTHON_HOME: "C:\\Python33-x64"
+      PYTHON_VERSION: "3.3"
+      PYTHON_ARCH: "64"
+    - TOXENV: "3.3-nocover"
+      TOXPYTHON: "C:\\Python33\\python.exe"
+      WINDOWS_SDK_VERSION: "v7.1"
+      PYTHON_HOME: "C:\\Python33"
+      PYTHON_VERSION: "3.3"
+      PYTHON_ARCH: "32"
+    - TOXENV: "3.3-nocover"
+      TOXPYTHON: "C:\\Python33-x64\\python.exe"
+      WINDOWS_SDK_VERSION: "v7.1"
+      PYTHON_HOME: "C:\\Python33-x64"
+      PYTHON_VERSION: "3.3"
+      PYTHON_ARCH: "64"
+    - TOXENV: "3.4"
+      TOXPYTHON: "C:\\Python34\\python.exe"
+      WINDOWS_SDK_VERSION: "v7.1"
+      PYTHON_HOME: "C:\\Python34"
+      PYTHON_VERSION: "3.4"
+      PYTHON_ARCH: "32"
+    - TOXENV: "3.4"
+      TOXPYTHON: "C:\\Python34-x64\\python.exe"
+      WINDOWS_SDK_VERSION: "v7.1"
+      PYTHON_HOME: "C:\\Python34-x64"
+      PYTHON_VERSION: "3.4"
+      PYTHON_ARCH: "64"
+    - TOXENV: "3.4-nocover"
+      TOXPYTHON: "C:\\Python34\\python.exe"
+      WINDOWS_SDK_VERSION: "v7.1"
+      PYTHON_HOME: "C:\\Python34"
+      PYTHON_VERSION: "3.4"
+      PYTHON_ARCH: "32"
+    - TOXENV: "3.4-nocover"
+      TOXPYTHON: "C:\\Python34-x64\\python.exe"
+      WINDOWS_SDK_VERSION: "v7.1"
+      PYTHON_HOME: "C:\\Python34-x64"
+      PYTHON_VERSION: "3.4"
+      PYTHON_ARCH: "64"
+init:
+  - "ECHO %TOXENV%"
+  - ps: "ls C:\\Python*"
+install:
+  - "powershell ci\\appveyor-bootstrap.ps1"
+test_script:
+  - "%PYTHON_HOME%\\Scripts\\tox --version"
+  - "%PYTHON_HOME%\\Scripts\\virtualenv --version"
+  - "%PYTHON_HOME%\\Scripts\\pip --version"
+  - "%WITH_COMPILER% %PYTHON_HOME%\\Scripts\\tox"
+after_test:
+  - "IF \"%TOXENV:~-8,8%\" == \"-nocover\" %WITH_COMPILER% %TOXPYTHON% setup.py bdist_wheel"
+artifacts:
+  - path: dist\*
+
diff --git a/ci/appveyor-bootstrap.ps1 b/ci/appveyor-bootstrap.ps1
new file mode 100644
index 0000000..1dd5342
--- /dev/null
+++ b/ci/appveyor-bootstrap.ps1
@@ -0,0 +1,88 @@
+# Source: https://github.com/pypa/python-packaging-user-guide/blob/master/source/code/install.ps1
+# Sample script to install Python and pip under Windows
+# Authors: Olivier Grisel and Kyle Kastner
+# License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
+
+$BASE_URL = "https://www.python.org/ftp/python/"
+$GET_PIP_URL = "https://bootstrap.pypa.io/get-pip.py"
+$GET_PIP_PATH = "C:\get-pip.py"
+
+
+function DownloadPython ($python_version, $platform_suffix) {
+    $webclient = New-Object System.Net.WebClient
+    $filename = "python-" + $python_version + $platform_suffix + ".msi"
+    $url = $BASE_URL + $python_version + "/" + $filename
+
+    $basedir = $pwd.Path + "\"
+    $filepath = $basedir + $filename
+    if (Test-Path $filename) {
+        Write-Host "Reusing" $filepath
+        return $filepath
+    }
+
+    # Download and retry up to 5 times in case of network transient errors.
+    Write-Host "Downloading" $filename "from" $url
+    $retry_attempts = 3
+    for($i=0; $i -lt $retry_attempts; $i++){
+        try {
+            $webclient.DownloadFile($url, $filepath)
+            break
+        }
+        Catch [Exception]{
+            Start-Sleep 1
+        }
+   }
+   Write-Host "File saved at" $filepath
+   return $filepath
+}
+
+
+function InstallPython ($python_version, $architecture, $python_home) {
+    Write-Host "Installing Python" $python_version "for" $architecture "bit architecture to" $python_home
+    if (Test-Path $python_home) {
+        Write-Host $python_home "already exists, skipping."
+        return $false
+    }
+    if ($architecture -eq "32") {
+        $platform_suffix = ""
+    } else {
+        $platform_suffix = ".amd64"
+    }
+    $filepath = DownloadPython $python_version $platform_suffix
+    Write-Host "Installing" $filepath "to" $python_home
+    $args = "/qn /i $filepath TARGETDIR=$python_home"
+    Write-Host "msiexec.exe" $args
+    Start-Process -FilePath "msiexec.exe" -ArgumentList $args -Wait -Passthru
+    Write-Host "Python $python_version ($architecture) installation complete"
+    return $true
+}
+
+
+function InstallPip ($python_home) {
+    $pip_path = $python_home + "/Scripts/pip.exe"
+    $python_path = $python_home + "/python.exe"
+    if (-not(Test-Path $pip_path)) {
+        Write-Host "Installing pip..."
+        $webclient = New-Object System.Net.WebClient
+        $webclient.DownloadFile($GET_PIP_URL, $GET_PIP_PATH)
+        Write-Host "Executing:" $python_path $GET_PIP_PATH
+        Start-Process -FilePath "$python_path" -ArgumentList "$GET_PIP_PATH" -Wait -Passthru
+    } else {
+        Write-Host "pip already installed."
+    }
+}
+
+function InstallPackage ($python_home, $pkg) {
+    $pip_path = $python_home + "/Scripts/pip.exe"
+    & $pip_path install $pkg
+}
+
+function main () {
+    InstallPython $env:PYTHON_VERSION $env:PYTHON_ARCH $env:PYTHON_HOME
+    InstallPip $env:PYTHON_HOME
+    InstallPackage $env:PYTHON_HOME setuptools
+    InstallPackage $env:PYTHON_HOME wheel
+    InstallPackage $env:PYTHON_HOME tox
+}
+
+main
diff --git a/ci/appveyor-with-compiler.cmd b/ci/appveyor-with-compiler.cmd
new file mode 100644
index 0000000..3619733
--- /dev/null
+++ b/ci/appveyor-with-compiler.cmd
@@ -0,0 +1,37 @@
+:: To build extensions for 64 bit Python 3, we need to configure environment
+:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of:
+:: MS Windows SDK for Windows 7 and .NET Framework 4 (SDK v7.1)
+::
+:: To build extensions for 64 bit Python 2, we need to configure environment
+:: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of:
+:: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0)
+::
+:: 32 bit builds do not require specific environment configurations.
+::
+:: Note: this script needs to be run with the /E:ON and /V:ON flags for the
+:: cmd interpreter, at least for (SDK v7.0)
+::
+:: More details at:
+:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows
+:: http://stackoverflow.com/a/13751649/163740
+::
+:: Author: Olivier Grisel
+:: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
+ at ECHO OFF
+
+SET COMMAND_TO_RUN=%*
+SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows
+
+IF "%PYTHON_ARCH%"=="64" (
+    ECHO SDK: %WINDOWS_SDK_VERSION% ARCH: %PYTHON_ARCH%
+    SET DISTUTILS_USE_SDK=1
+    SET MSSdk=1
+    "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION%
+    "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release
+    ECHO Executing: %COMMAND_TO_RUN%
+    call %COMMAND_TO_RUN% || EXIT 1
+) ELSE (
+    ECHO SDK: %WINDOWS_SDK_VERSION% ARCH: %PYTHON_ARCH%
+    ECHO Executing: %COMMAND_TO_RUN%
+    call %COMMAND_TO_RUN% || EXIT 1
+)
diff --git a/ci/bootstrap.py b/ci/bootstrap.py
new file mode 100755
index 0000000..466bb8f
--- /dev/null
+++ b/ci/bootstrap.py
@@ -0,0 +1,64 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+from __future__ import absolute_import, print_function, unicode_literals
+
+import os
+import sys
+from os.path import exists
+from os.path import join
+from os.path import dirname
+from os.path import abspath
+
+
+if __name__ == "__main__":
+    base_path = dirname(dirname(abspath(__file__)))
+    print("Project path: {0}".format(base_path))
+    env_path = join(base_path, ".tox", "bootstrap")
+    if sys.platform == "win32":
+        bin_path = join(env_path, "Scripts")
+    else:
+        bin_path = join(env_path, "bin")
+    if not exists(env_path):
+        import subprocess
+        print("Making bootstrap env in: {0} ...".format(env_path))
+        try:
+            subprocess.check_call(["virtualenv", env_path])
+        except Exception:
+            subprocess.check_call([sys.executable, "-m", "virtualenv", env_path])
+        print("Installing `jinja2` and `matrix` into bootstrap environment ...")
+        subprocess.check_call([join(bin_path, "pip"), "install", "jinja2", "matrix"])
+    activate = join(bin_path, "activate_this.py")
+    exec(compile(open(activate, "rb").read(), activate, "exec"), dict(__file__=activate))
+
+    import jinja2
+    import matrix
+
+    jinja = jinja2.Environment(
+        loader=jinja2.FileSystemLoader(join(base_path, "ci", "templates")),
+        trim_blocks=True,
+        lstrip_blocks=True,
+        keep_trailing_newline=True
+    )
+    tox_environments = {}
+    for (alias, conf) in matrix.from_file(join(base_path, "setup.cfg")).items():
+        python = conf["python_versions"]
+        deps = conf["dependencies"]
+        if "coverage_flags" in conf:
+            cover = {"false": False, "true": True}[conf["coverage_flags"].lower()]
+        if "environment_variables" in conf:
+            env_vars = conf["environment_variables"]
+
+        tox_environments[alias] = {
+            "python": "python" + python if "py" not in python else python,
+            "deps": deps.split(),
+        }
+        if "coverage_flags" in conf:
+            tox_environments[alias].update(cover=cover)
+        if "environment_variables" in conf:
+            tox_environments[alias].update(env_vars=env_vars.split())
+
+    for name in os.listdir(join("ci", "templates")):
+        with open(join(base_path, name), "w") as fh:
+            fh.write(jinja.get_template(name).render(tox_environments=tox_environments))
+        print("Wrote {}".format(name))
+    print("DONE.")
diff --git a/ci/templates/.travis.yml b/ci/templates/.travis.yml
new file mode 100644
index 0000000..6fd1b41
--- /dev/null
+++ b/ci/templates/.travis.yml
@@ -0,0 +1,27 @@
+language: python
+python: 2.7
+sudo: false
+env:
+  global:
+    LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
+  matrix:
+    - TOXENV=check
+{% for env, config in tox_environments|dictsort %}
+    - TOXENV={{ env }}{% if config.cover %},extension-coveralls,coveralls,codecov{% endif %}
+
+{% endfor %}
+before_install:
+  - python --version
+  - virtualenv --version
+  - pip --version
+  - uname -a
+  - lsb_release -a
+install:
+  - pip install tox
+script:
+  - tox -v
+notifications:
+  email:
+    on_success: never
+    on_failure: always
+
diff --git a/ci/templates/appveyor.yml b/ci/templates/appveyor.yml
new file mode 100644
index 0000000..5531032
--- /dev/null
+++ b/ci/templates/appveyor.yml
@@ -0,0 +1,39 @@
+version: '{branch}-{build}'
+build: off
+environment:
+  global:
+    WITH_COMPILER: "cmd /E:ON /V:ON /C .\\ci\\appveyor-with-compiler.cmd"
+  matrix:
+    - TOXENV: check
+      PYTHON_HOME: "C:\\Python27"
+      PYTHON_VERSION: "2.7"
+      PYTHON_ARCH: "32"
+{% for env, config in tox_environments|dictsort %}{% if env.startswith('2.7') or env.startswith('3.4') or env.startswith('3.3') %}
+    - TOXENV: "{{ env }}"
+      TOXPYTHON: "C:\\Python{{ env[:3].replace('.', '') }}\\python.exe"
+      WINDOWS_SDK_VERSION: "v7.{{ '1' if env[0] == '3' else '0' }}"
+      PYTHON_HOME: "C:\\Python{{ env[:3].replace('.', '') }}"
+      PYTHON_VERSION: "{{ env[:3] }}"
+      PYTHON_ARCH: "32"
+    - TOXENV: "{{ env }}"
+      TOXPYTHON: "C:\\Python{{ env[:3].replace('.', '') }}-x64\\python.exe"
+      WINDOWS_SDK_VERSION: "v7.{{ '1' if env[0] == '3' else '0' }}"
+      PYTHON_HOME: "C:\\Python{{ env[:3].replace('.', '') }}-x64"
+      PYTHON_VERSION: "{{ env[:3] }}"
+      PYTHON_ARCH: "64"
+{% endif %}{% endfor %}
+init:
+  - "ECHO %TOXENV%"
+  - ps: "ls C:\\Python*"
+install:
+  - "powershell ci\\appveyor-bootstrap.ps1"
+test_script:
+  - "%PYTHON_HOME%\\Scripts\\tox --version"
+  - "%PYTHON_HOME%\\Scripts\\virtualenv --version"
+  - "%PYTHON_HOME%\\Scripts\\pip --version"
+  - "%WITH_COMPILER% %PYTHON_HOME%\\Scripts\\tox"
+after_test:
+  - "IF \"%TOXENV:~-8,8%\" == \"-nocover\" %WITH_COMPILER% %TOXPYTHON% setup.py bdist_wheel"
+artifacts:
+  - path: dist\*
+
diff --git a/ci/templates/tox.ini b/ci/templates/tox.ini
new file mode 100644
index 0000000..b401bff
--- /dev/null
+++ b/ci/templates/tox.ini
@@ -0,0 +1,140 @@
+[tox]
+envlist =
+    clean,
+    check,
+{% for env in tox_environments|sort %}
+    {{ env }},
+{% endfor %}
+    report,
+    docs
+
+[testenv]
+setenv =
+    PYTHONPATH={toxinidir}/tests
+    PYTHONUNBUFFERED=yes
+passenv =
+    *
... 5062 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/lazy-object-proxy.git



More information about the Python-modules-commits mailing list