From b75bed059e4101b8d3f895bfef52b55dd6834665 Mon Sep 17 00:00:00 2001 From: Manuel Nuno Melo Date: Tue, 16 Jan 2018 23:37:37 +0000 Subject: [PATCH] Build badge now points to travis Version bumped (to 0.2) Copyright years adjusted Shortcut script to testing Submission to PyPi --- CHANGELOG | 6 ++++++ README.rst | 4 ++-- build_and_test.sh | 8 ++++++++ lazy_import/VERSION | 2 +- lazy_import/__init__.py | 2 +- lazy_import/test_lazy.py | 8 ++++---- setup.py | 1 + 7 files changed, 23 insertions(+), 8 deletions(-) create mode 100755 build_and_test.sh diff --git a/CHANGELOG b/CHANGELOG index 84e8760..620e53b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +17/01/2018 v0.2 + - stabilized a python 3 bug when importing modules using 'import modulename' + syntax. + - added a test shortcut. + - published to PyPi (yay!) + 25/08/2017 v0.1 - along with python 2.7, the code is now Python 3 compatible (at least versions 3.4 through 3.6). diff --git a/README.rst b/README.rst index 80b0508..54a9e97 100644 --- a/README.rst +++ b/README.rst @@ -172,7 +172,7 @@ respective license notices are reproduced here: lazy_import — a module to allow lazy importing of python modules - Copyright (C) 2017 Manuel Nuno Melo + Copyright (C) 2017-2018 Manuel Nuno Melo lazy_import is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -204,7 +204,7 @@ functionality (lazy importing of callable objects). .. |Build Status| image:: https://api.travis-ci.org/mnmelo/lazy_import.svg - :target: https://github.com/mnmelo/lazy_import + :target: https://travis-ci.org/mnmelo/lazy_import .. |importing| replace:: ``importing`` .. |pytest| replace:: ``pytest`` diff --git a/build_and_test.sh b/build_and_test.sh new file mode 100755 index 0000000..36ae5e0 --- /dev/null +++ b/build_and_test.sh @@ -0,0 +1,8 @@ +#!/bin/bash -e +basedir=$(pwd) +cd +pip3 install --force-reinstall --user $basedir +pip2 install --force-reinstall --user $basedir +python3 -m pytest --boxed -n 4 -v --pyargs lazy_import +python2 -m pytest --boxed -n 4 -v --pyargs lazy_import +cd $basedir diff --git a/lazy_import/VERSION b/lazy_import/VERSION index 49d5957..3b04cfb 100644 --- a/lazy_import/VERSION +++ b/lazy_import/VERSION @@ -1 +1 @@ -0.1 +0.2 diff --git a/lazy_import/__init__.py b/lazy_import/__init__.py index e17a566..03eaa39 100644 --- a/lazy_import/__init__.py +++ b/lazy_import/__init__.py @@ -2,7 +2,7 @@ # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # lazy_import --- https://github.com/mnmelo/lazy_import -# Copyright (C) 2017 Manuel Nuno Melo +# Copyright (C) 2017-2018 Manuel Nuno Melo # # This file is part of lazy_import. # diff --git a/lazy_import/test_lazy.py b/lazy_import/test_lazy.py index d9c36d6..7ab2cf6 100644 --- a/lazy_import/test_lazy.py +++ b/lazy_import/test_lazy.py @@ -2,7 +2,7 @@ # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # Testing for lazy_import --- https://github.com/mnmelo/lazy_import -# Copyright (C) 2017 Manuel Nuno Melo +# Copyright (C) 2017-2018 Manuel Nuno Melo # # This file is part of lazy_import. # @@ -67,7 +67,7 @@ class _TestLazyModule(lazy_import.LazyModule): _GENERATED_NAMES = [] # Modules not usually loaded on startup -NAMES_EXISTING = ("concurrent", "distutils.core") +NAMES_EXISTING = ("sched", "distutils.core") LEVELS = ("leaf", "base") CLASSES = (_TestLazyModule, lazy_import.LazyModule) @@ -115,8 +115,8 @@ def _check_lazy_loading(modname): # Can only test that for the module names we know of # (meaning, no random ones) if modname in NAMES_EXISTING: - if modname == 'concurrent': - import concurrent as newmod + if modname == 'sched': + import sched as newmod elif modname == 'distutils.core': import distutils.core as newmod assert str(newmod) == "Lazily-loaded module " + modname diff --git a/setup.py b/setup.py index 261feb6..31a51aa 100644 --- a/setup.py +++ b/setup.py @@ -18,6 +18,7 @@ author='Manuel Nuno Melo', author_email='manuel.nuno.melo@gmail.com', license='GPL', + platforms = ["any"], classifiers=['Development Status :: 4 - Beta', # Indicate who your project is intended for 'Intended Audience :: Developers',