alignment with commons
This commit is contained in:
parent
419b3e3a10
commit
669bc64261
|
@ -125,6 +125,12 @@ Continue from previous example:
|
|||
As a pyexcel plugin
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
No longer, explicit import is needed since pyexcel version 0.2.2. Instead,
|
||||
this library is auto-loaded. So if you want to read data in xls format,
|
||||
installing it is enough.
|
||||
|
||||
Any version under pyexcel 0.2.2, you have to keep doing the following:
|
||||
|
||||
Import it in your file to enable this plugin:
|
||||
|
||||
.. code-block:: python
|
||||
|
@ -141,7 +147,7 @@ Here is the sample code:
|
|||
.. code-block:: python
|
||||
|
||||
>>> import pyexcel as pe
|
||||
>>> from pyexcel.ext import xls
|
||||
>>> # from pyexcel.ext import xls
|
||||
>>> sheet = pe.get_book(file_name="your_file.xls")
|
||||
>>> sheet
|
||||
Sheet Name: Sheet 1
|
||||
|
|
89
setup.py
89
setup.py
|
@ -5,45 +5,31 @@ except ImportError:
|
|||
use_setuptools()
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
with open("README.rst", 'r') as readme:
|
||||
README_txt = readme.read()
|
||||
|
||||
with open("CHANGELOG.rst", 'r') as changelog:
|
||||
README_txt += changelog.read()
|
||||
|
||||
dependencies = [
|
||||
'pyexcel-io>=0.1.0',
|
||||
'xlrd',
|
||||
'xlwt-future',
|
||||
]
|
||||
|
||||
extras = {}
|
||||
|
||||
|
||||
setup(
|
||||
name='pyexcel-xls',
|
||||
author='C.W.',
|
||||
version='0.2.0',
|
||||
author_email='wangc_2011 (at) hotmail.com',
|
||||
url='https://github.com/pyexcel/pyexcel-xls',
|
||||
description='A wrapper library to read, manipulate and write data in xls format. It reads xlsx and xlsm format',
|
||||
install_requires=dependencies,
|
||||
extras_require=extras,
|
||||
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
|
||||
include_package_data=True,
|
||||
long_description=README_txt,
|
||||
zip_safe=False,
|
||||
tests_require=['nose'],
|
||||
keywords=[
|
||||
NAME = 'pyexcel-xls'
|
||||
AUTHOR = 'C.W.'
|
||||
VERSION = '0.2.0'
|
||||
EMAIL = 'wangc_2011 (at) hotmail.com'
|
||||
LICENSE = 'New BSD'
|
||||
PACKAGES = find_packages(exclude=['ez_setup', 'examples', 'tests'])
|
||||
DESCRIPTION = 'A wrapper library to read, manipulate and write data in xls format. It reads xlsx and xlsm format'
|
||||
KEYWORDS = [
|
||||
'excel',
|
||||
'python',
|
||||
'pyexcel',
|
||||
'xls',
|
||||
'xlsx',
|
||||
'xlsm'
|
||||
],
|
||||
license='New BSD',
|
||||
classifiers=[
|
||||
]
|
||||
|
||||
INSTALL_REQUIRES = [
|
||||
'pyexcel-io>=0.1.0',
|
||||
'xlrd',
|
||||
'xlwt-future',
|
||||
]
|
||||
|
||||
EXTRAS_REQUIRE = {}
|
||||
|
||||
CLASSIFIERS = [
|
||||
'Topic :: Office/Business',
|
||||
'Topic :: Utilities',
|
||||
'Topic :: Software Development :: Libraries',
|
||||
|
@ -57,5 +43,38 @@ setup(
|
|||
'Programming Language :: Python :: 3.4',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: Implementation :: PyPy'
|
||||
]
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
def read_files(*files):
|
||||
"""Read files into setup"""
|
||||
text = ""
|
||||
for single_file in files:
|
||||
text = text + read(single_file) + "\n"
|
||||
return text
|
||||
|
||||
|
||||
def read(afile):
|
||||
"""Read a file into setup"""
|
||||
with open(afile, 'r') as opened_file:
|
||||
return opened_file.read()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
setup(
|
||||
name=NAME,
|
||||
author=AUTHOR,
|
||||
version=VERSION,
|
||||
author_email=EMAIL,
|
||||
description=DESCRIPTION,
|
||||
install_requires=INSTALL_REQUIRES,
|
||||
keywords=KEYWORDS,
|
||||
extras_require=EXTRAS_REQUIRE,
|
||||
packages=PACKAGES,
|
||||
include_package_data=True,
|
||||
long_description=read_files('README.rst', 'CHANGELOG.rst'),
|
||||
zip_safe=False,
|
||||
tests_require=['nose'],
|
||||
license=LICENSE,
|
||||
classifiers=CLASSIFIERS
|
||||
)
|
Loading…
Reference in New Issue