Skip to content

Commit 513850a

Browse files
committed
🤝 take latest code from setupmobans and release 🥚 🎡 0.1.3, carrying LICENSE file, pyexcel/pyexcel#103
1 parent 3bd5dc4 commit 513850a

12 files changed

+126
-56
lines changed

.gitignore

+6-2
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,11 @@ ENV/
8989

9090
# Rope project settings
9191
.ropeproject
92+
93+
# emacs
9294
*~
93-
commons/
94-
commons
95+
96+
# moban hashes
9597
.moban.hashes
98+
.DS_store
99+

.moban.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@ configuration:
22
configuration_dir: "commons/config"
33
template_dir:
44
- "commons/templates"
5+
- "setupmobans/templates"
56
- ".moban.d"
67
configuration: pyexcel_webio.yaml
78
targets:
89
- setup.py: setup.py
910
- "docs/source/conf.py": "docs/source/conf.py.jj2"
1011
- .travis.yml: travis.yml.jj2
1112
- requirements.txt: requirements.txt
12-
- LICENSE: LICENSE.jj2
13+
- LICENSE: NEW_BSD_LICENSE.jj2
1314
- MANIFEST.in: MANIFEST.in.jj2
14-
- .gitignore: .gitignore.jj2
15-
- test.sh: test.sh.jj2
16-
- test.bat: test.sh.jj2
15+
- .gitignore: gitignore.jj2
16+
- test.sh: test.script.jj2
17+
- test.bat: test.script.jj2
1718
- "tests/requirements.txt": "tests/requirements.txt"
1819
- README.rst: README.rst

.travis.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,14 @@ language: python
33
notifications:
44
email: false
55
python:
6-
- pypy
6+
- pypy-5.3.1
77
- 3.6
88
- 3.5
99
- 3.4
1010
- 3.3
1111
- 2.7
1212
- 2.6
1313
before_install:
14-
- cd $HOME
15-
- "if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then deactivate && wget https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-5.7.1-linux_x86_64-portable.tar.bz2 -O - | tar -jxf - && echo 'Setting up aliases...' && ln -s pypy-5.7.1-linux_x86_64-portable pypy2-latest && export PATH=$HOME/pypy2-latest/bin/:$PATH && virtualenv --no-site-packages --python ~/pypy2-latest/bin/pypy pypy2-env && echo 'Creating custom env...' && source pypy2-env/bin/activate && python -V; fi"
16-
- cd -
1714
- if [[ $TRAVIS_PYTHON_VERSION == "2.6" ]]; then pip install flake8==2.6.2; fi
1815
- if [[ -f min_requirements.txt && "$MINREQ" -eq 1 ]]; then
1916
mv min_requirements.txt requirements.txt ;

CHANGELOG.rst

+15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
Change log
22
================================================================================
33

4+
0.1.3 - 20.10.2017
5+
--------------------------------------------------------------------------------
6+
7+
added
8+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
9+
10+
#. `#103 <https://github.com/pyexcel/pyexcel/pull/103>`_, include LICENSE file
11+
in MANIFEST.in, meaning LICENSE file will appear in the released tar ball.
12+
13+
updated
14+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15+
16+
#. Take pyexcel 0.5.5 as dependency
17+
18+
419
0.1.2 - 12.07.2017
520
--------------------------------------------------------------------------------
621

MANIFEST.in

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
include README.rst
2+
include LICENSE
23
include CHANGELOG.rst

README.rst

+27-21
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,43 @@ pyexcel-webio - Let you focus on data, instead of file formats
88
.. image:: https://api.travis-ci.org/pyexcel/pyexcel-webio.svg?branch=master
99
:target: http://travis-ci.org/pyexcel/pyexcel-webio
1010

11-
.. image:: https://codecov.io/github/pyexcel/pyexcel-webio/coverage.png
12-
:target: https://codecov.io/github/pyexcel/pyexcel-webio
11+
.. image:: https://codecov.io/gh/pyexcel/pyexcel-webio/branch/master/graph/badge.svg
12+
:target: https://codecov.io/gh/pyexcel/pyexcel-webio
1313

1414
.. image:: https://img.shields.io/gitter/room/gitterHQ/gitter.svg
1515
:target: https://gitter.im/pyexcel/Lobby
1616

1717

18+
Support the project
19+
================================================================================
20+
21+
If your company has embedded pyexcel and its components into a revenue generating
22+
product, please `support me on patreon <https://www.patreon.com/bePatron?u=5537627>`_ to
23+
maintain the project and develop it further.
24+
25+
If you are an individual, you are welcome to support me too on patreon and for however long
26+
you feel like. As a patreon, you will receive
27+
`early access to pyexcel related contents <https://www.patreon.com/pyexcel/posts>`_.
28+
29+
With your financial support, I will be able to invest
30+
a little bit more time in coding, documentation and writing interesting posts.
31+
32+
1833
Known constraints
1934
==================
2035

2136
Fonts, colors and charts are not supported.
2237

38+
Introduction
39+
================================================================================
2340
**pyexcel-webio** is a tiny interface library to unify the web extensions that uses `pyexcel <https://github.com/pyexcel/pyexcel>`__ . You may use it to write a web extension for your faviourite Python web framework.
2441

2542

2643

2744
Installation
2845
================================================================================
29-
You can install it via pip:
46+
47+
You can install pyexcel-webio via pip:
3048

3149
.. code-block:: bash
3250
@@ -119,21 +137,6 @@ This small section outlines the steps to adapt **pyexcel-webio** for your favour
119137
make_response_from_book_dict
120138
)
121139

122-
Support the project
123-
================================================================================
124-
125-
If your company has embedded pyexcel and its components into a revenue generating
126-
product, please `support me on patreon <https://www.patreon.com/bePatron?u=5537627>`_ to
127-
maintain the project and develop it further.
128-
129-
If you are an individual, you are welcome to support me too on patreon and for however long
130-
you feel like to. As a patreon, you will receive
131-
`early access to pyexcel related contents <https://www.patreon.com/pyexcel/posts>`_.
132-
133-
With your financial support, I will be able to invest
134-
a little bit more time in coding, documentation and writing interesting posts.
135-
136-
137140
Development guide
138141
================================================================================
139142

@@ -158,9 +161,9 @@ and update CHANGELOG.rst.
158161
.. note::
159162

160163
As to rnd_requirements.txt, usually, it is created when a dependent
161-
library is not released. Once the dependecy is installed
162-
(will be released), the future
163-
version of the dependency in the requirements.txt will be valid.
164+
library is not released. Once the dependecy is installed
165+
(will be released), the future
166+
version of the dependency in the requirements.txt will be valid.
164167

165168

166169
How to test your contribution
@@ -182,6 +185,7 @@ How to update test environment and update documentation
182185
Additional steps are required:
183186

184187
#. pip install moban
188+
#. git clone https://github.com/moremoban/setupmobans.git # generic setup
185189
#. git clone https://github.com/pyexcel/pyexcel-commons.git commons
186190
#. make your changes in `.moban.d` directory, then issue command `moban`
187191

@@ -202,6 +206,8 @@ Acceptance criteria
202206
#. Has all code lines tested
203207
#. Passes all Travis CI builds
204208
#. Has fair amount of documentation if your change is complex
209+
#. Please update CHANGELOG.rst
210+
#. Please add yourself to CONTRIBUTORS.rst
205211
#. Agree on NEW BSD License for your contribution
206212

207213

docs/source/conf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020

2121
project = u'pyexcel-webio'
2222
copyright = u'2015-2017 Onni Software Ltd.'
23-
version = '0.1.1'
24-
release = '0.1.2'
23+
version = '0.1.3'
24+
release = '0.1.3'
2525
exclude_patterns = []
2626
pygments_style = 'sphinx'
2727
html_theme = 'default'

pyexcel_webio.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
overrides: "pyexcel.yaml"
22
name: "pyexcel-webio"
33
nick_name: webio
4-
version: "0.1.2"
5-
current_version: "0.1.2"
6-
release: "0.1.1"
4+
version: "0.1.3"
5+
current_version: "0.1.3"
6+
release: "0.1.3"
77
dependencies:
8-
- pyexcel>=0.5.1
8+
- pyexcel>=0.5.5
99
description:
1010
A generic request and response interface for pyexcel web extensions.

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pyexcel>=0.5.1
1+
pyexcel>=0.5.5

setup.py

+62-16
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
try:
2-
from setuptools import setup, find_packages
3-
except ImportError:
4-
from ez_setup import use_setuptools
5-
use_setuptools()
6-
from setuptools import setup, find_packages
1+
# Template by setupmobans
2+
import os
3+
import sys
4+
import codecs
5+
from shutil import rmtree
6+
from setuptools import setup, find_packages, Command
77

88
NAME = 'pyexcel-webio'
99
AUTHOR = 'C.W.'
10-
VERSION = '0.1.2'
10+
VERSION = '0.1.3'
1111
1212
LICENSE = 'New BSD'
1313
DESCRIPTION = (
1414
'A generic request and response interface for pyexcel web extensions.' +
1515
''
1616
)
17+
URL = 'https://github.com/pyexcel/pyexcel-webio'
18+
DOWNLOAD_URL = '%s/archive/0.1.3.tar.gz' % URL
19+
FILES = ['README.rst', 'CHANGELOG.rst']
1720
KEYWORDS = [
18-
'excel',
19-
'python',
20-
'pyexcel',
2121
'http'
22+
'python'
2223
]
2324

2425
CLASSIFIERS = [
2526
'Topic :: Office/Business',
2627
'Topic :: Utilities',
2728
'Topic :: Software Development :: Libraries',
2829
'Programming Language :: Python',
29-
'License :: OSI Approved :: BSD License',
3030
'Intended Audience :: Developers',
3131
'Programming Language :: Python :: 2.6',
3232
'Programming Language :: Python :: 2.7',
@@ -49,13 +49,49 @@
4949
]
5050

5151
INSTALL_REQUIRES = [
52-
'pyexcel>=0.5.1',
52+
'pyexcel>=0.5.5',
5353
]
5454

5555

5656
PACKAGES = find_packages(exclude=['ez_setup', 'examples', 'tests'])
5757
EXTRAS_REQUIRE = {
5858
}
59+
PUBLISH_COMMAND = '{0} setup.py sdist bdist_wheel upload -r pypi'.format(
60+
sys.executable)
61+
GS_COMMAND = ('gs pyexcel-webio v0.1.3 ' +
62+
"Find 0.1.3 in changelog for more details")
63+
here = os.path.abspath(os.path.dirname(__file__))
64+
65+
66+
class PublishCommand(Command):
67+
"""Support setup.py upload."""
68+
69+
description = 'Build and publish the package on github and pypi'
70+
user_options = []
71+
72+
@staticmethod
73+
def status(s):
74+
"""Prints things in bold."""
75+
print('\033[1m{0}\033[0m'.format(s))
76+
77+
def initialize_options(self):
78+
pass
79+
80+
def finalize_options(self):
81+
pass
82+
83+
def run(self):
84+
try:
85+
self.status('Removing previous builds...')
86+
rmtree(os.path.join(here, 'dist'))
87+
except OSError:
88+
pass
89+
90+
self.status('Building Source and Wheel (universal) distribution...')
91+
if os.system(GS_COMMAND) == 0:
92+
os.system(PUBLISH_COMMAND)
93+
94+
sys.exit()
5995

6096

6197
def read_files(*files):
@@ -69,7 +105,7 @@ def read_files(*files):
69105

70106
def read(afile):
71107
"""Read a file into setup"""
72-
with open(afile, 'r') as opened_file:
108+
with codecs.open(afile, 'r', 'utf-8') as opened_file:
73109
content = filter_out_test_code(opened_file)
74110
content = "".join(list(content))
75111
return content
@@ -92,7 +128,11 @@ def filter_out_test_code(file_handle):
92128
found_test_code = False
93129
yield line
94130
else:
95-
yield line
131+
for keyword in ['|version|', '|today|']:
132+
if keyword in line:
133+
break
134+
else:
135+
yield line
96136

97137

98138
if __name__ == '__main__':
@@ -102,7 +142,9 @@ def filter_out_test_code(file_handle):
102142
version=VERSION,
103143
author_email=EMAIL,
104144
description=DESCRIPTION,
105-
long_description=read_files('README.rst', 'CHANGELOG.rst'),
145+
url=URL,
146+
download_url=DOWNLOAD_URL,
147+
long_description=read_files(*FILES),
106148
license=LICENSE,
107149
keywords=KEYWORDS,
108150
extras_require=EXTRAS_REQUIRE,
@@ -111,5 +153,9 @@ def filter_out_test_code(file_handle):
111153
packages=PACKAGES,
112154
include_package_data=True,
113155
zip_safe=False,
114-
classifiers=CLASSIFIERS
156+
classifiers=CLASSIFIERS,
157+
setup_requires=['gease'],
158+
cmdclass={
159+
'publish': PublishCommand,
160+
}
115161
)

test.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
pip freeze
2-
nosetests --with-cov --cover-package pyexcel_webio --cover-package tests --with-doctest --doctest-extension=.rst README.rst tests docs/source pyexcel_webio && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long
2+
nosetests --with-coverage --cover-package pyexcel_webio --cover-package tests --with-doctest --doctest-extension=.rst README.rst tests docs/source pyexcel_webio && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long

test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
pip freeze
2-
nosetests --with-cov --cover-package pyexcel_webio --cover-package tests --with-doctest --doctest-extension=.rst README.rst tests docs/source pyexcel_webio && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long
2+
nosetests --with-coverage --cover-package pyexcel_webio --cover-package tests --with-doctest --doctest-extension=.rst README.rst tests docs/source pyexcel_webio && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long

0 commit comments

Comments
 (0)