Skip to content

Commit

Permalink
Build badge now points to travis
Browse files Browse the repository at this point in the history
Version bumped (to 0.2)

Copyright years adjusted

Shortcut script to testing

Submission to PyPi
  • Loading branch information
mnmelo committed Jan 17, 2018
1 parent d55c9cb commit b75bed0
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -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).
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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``
Expand Down
8 changes: 8 additions & 0 deletions build_and_test.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion lazy_import/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1
0.2
2 changes: 1 addition & 1 deletion lazy_import/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#
Expand Down
8 changes: 4 additions & 4 deletions lazy_import/test_lazy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
author='Manuel Nuno Melo',
author_email='[email protected]',
license='GPL',
platforms = ["any"],
classifiers=['Development Status :: 4 - Beta',
# Indicate who your project is intended for
'Intended Audience :: Developers',
Expand Down

0 comments on commit b75bed0

Please sign in to comment.