Skip to content

Commit

Permalink
adjust lazy loading behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
chfw committed Dec 14, 2016
1 parent 54c87e6 commit 5132ca9
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 22 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Expand Up @@ -6,7 +6,6 @@ python:
- pypy
- 2.6
- 2.7
- pypy3
- 3.3
- 3.4
- 3.5
Expand Down
2 changes: 1 addition & 1 deletion pyexcel_xlsxw.yml
Expand Up @@ -6,5 +6,5 @@ release: 0.0.1
file_type: xlsx
dependencies:
- XlsxWriter==0.9.3
- pyexcel-io>=0.2.2
- pyexcel-io>=0.3.0
description: A wrapper library to write data in xlsx and xlsm format
11 changes: 8 additions & 3 deletions pyexcel_xlsxw/__init__.py
Expand Up @@ -10,8 +10,13 @@
# flake8: noqa
# this line has to be place above all else
# because of dynamic import
_FILE_TYPE = 'xlsx'
__pyexcel_io_plugins__ = [_FILE_TYPE]
__FILE_TYPE__ = 'xlsx'
__META__ = {
'submodule': __FILE_TYPE__,
'file_types': [__FILE_TYPE__],
'stream_type': 'binary'
}
__pyexcel_io_plugins__ = [__META__]


from pyexcel_io.io import isstream, store_data as write_data
Expand All @@ -20,5 +25,5 @@
def save_data(afile, data, file_type=None, **keywords):
"""standalone module function for writing module supported file type"""
if isstream(afile) and file_type is None:
file_type = _FILE_TYPE
file_type = __FILE_TYPE__
write_data(afile, data, file_type=file_type, **keywords)
2 changes: 1 addition & 1 deletion requirements.txt
@@ -1,2 +1,2 @@
XlsxWriter==0.9.3
pyexcel-io>=0.2.2
pyexcel-io>=0.3.0
1 change: 1 addition & 0 deletions rnd_requirements.txt
@@ -1,2 +1,3 @@
https://github.com/pyexcel/pyexcel/archive/master.zip
https://github.com/pyexcel/pyexcel-io/archive/master.zip

28 changes: 14 additions & 14 deletions setup.py
Expand Up @@ -10,7 +10,6 @@
VERSION = '0.0.2'
EMAIL = 'wangc_2011 (at) hotmail.com'
LICENSE = 'New BSD'
PACKAGES = find_packages(exclude=['ez_setup', 'examples', 'tests'])
DESCRIPTION = (
'A wrapper library to write data in xlsx and xlsm format' +
''
Expand All @@ -22,15 +21,6 @@
'xlsx'
]

INSTALL_REQUIRES = [
'XlsxWriter==0.9.3',
'pyexcel-io>=0.2.2',
]


EXTRAS_REQUIRE = {
}

CLASSIFIERS = [
'Topic :: Office/Business',
'Topic :: Utilities',
Expand All @@ -46,6 +36,16 @@
'Programming Language :: Python :: Implementation :: PyPy'
]

INSTALL_REQUIRES = [
'XlsxWriter==0.9.3',
'pyexcel-io>=0.3.0',
]


PACKAGES = find_packages(exclude=['ez_setup', 'examples', 'tests'])
EXTRAS_REQUIRE = {
}


def read_files(*files):
"""Read files into setup"""
Expand Down Expand Up @@ -91,14 +91,14 @@ def filter_out_test_code(file_handle):
version=VERSION,
author_email=EMAIL,
description=DESCRIPTION,
install_requires=INSTALL_REQUIRES,
long_description=read_files('README.rst', 'CHANGELOG.rst'),
license=LICENSE,
keywords=KEYWORDS,
extras_require=EXTRAS_REQUIRE,
tests_require=['nose'],
install_requires=INSTALL_REQUIRES,
packages=PACKAGES,
include_package_data=True,
long_description=read_files('README.rst', 'CHANGELOG.rst'),
zip_safe=False,
tests_require=['nose'],
license=LICENSE,
classifiers=CLASSIFIERS
)
3 changes: 2 additions & 1 deletion test.bat
@@ -1,3 +1,4 @@


pip freeze
nosetests --with-cov --cover-package pyexcel_xlsxw --cover-package tests --with-doctest --doctest-extension=.rst tests README.rst pyexcel_xlsxw && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long
nosetests --with-cov --cover-package pyexcel_xlsxw --cover-package tests --with-doctest --doctest-extension=.rst tests README.rst docs/source pyexcel_xlsxw && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long
3 changes: 2 additions & 1 deletion test.sh
@@ -1,3 +1,4 @@


pip freeze
nosetests --with-cov --cover-package pyexcel_xlsxw --cover-package tests --with-doctest --doctest-extension=.rst tests README.rst pyexcel_xlsxw && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long
nosetests --with-cov --cover-package pyexcel_xlsxw --cover-package tests --with-doctest --doctest-extension=.rst tests README.rst docs/source pyexcel_xlsxw && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long

0 comments on commit 5132ca9

Please sign in to comment.