Skip to content

Commit febda43

Browse files
committed
🤝 take latest code from setupmobans and release 0.5.1 🥚 🎡, which carries LICENSE file, pyexcel/pyexcel#103
1 parent dc73db5 commit febda43

File tree

7 files changed

+67
-18
lines changed

7 files changed

+67
-18
lines changed

CHANGELOG.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
Change log
22
===========
33

4+
0.5.1 - 20.10.2017
5+
--------------------------------------------------------------------------------
6+
7+
added
8+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
9+
10+
#. `#103 <https://github.com/pyexcel/pyexcel/issues/103>`_, include LICENSE file
11+
in MANIFEST.in, meaning LICENSE file will appear in the released tar ball.
12+
413
0.5.0 - 30.08.2017
514
--------------------------------------------------------------------------------
615

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
include README.rst
2+
include LICENSE
23
include CHANGELOG.rst

docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020

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

pyexcel-htmlr.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
overrides: "pyexcel.yaml"
22
name: "pyexcel-htmlr"
33
nick_name: "htmlr"
4-
version: "0.5.0"
5-
current_version: "0.5.0"
6-
release: "0.5.0"
4+
version: "0.5.1"
5+
current_version: "0.5.1"
6+
release: "0.5.1"
77
file_type: 'html'
88
dependencies:
99
- html5lib

setup.py

Lines changed: 50 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
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
73
import sys
4+
import codecs
5+
from shutil import rmtree
6+
from setuptools import setup, find_packages, Command
87
PY2 = sys.version_info[0] == 2
98
PY26 = PY2 and sys.version_info[1] < 7
109

1110
NAME = 'pyexcel-htmlr'
1211
AUTHOR = 'C.W.'
13-
VERSION = '0.5.0'
12+
VERSION = '0.5.1'
1413
1514
LICENSE = 'New BSD'
1615
DESCRIPTION = (
1716
'read tables in html file as excel data' +
1817
''
1918
)
2019
URL = 'https://github.com/pyexcel/pyexcel-htmlr'
21-
DOWNLOAD_URL = '%s/archive/0.5.0.tar.gz' % URL
22-
FILES = ['README.rst', 'CHANGELOG.rst']
20+
DOWNLOAD_URL = '%s/archive/0.5.1.tar.gz' % URL
21+
FILES = ['README.rst', 'CHANGELOG.rst']
2322
KEYWORDS = [
2423
'python'
2524
]
@@ -49,6 +48,42 @@
4948
PACKAGES = find_packages(exclude=['ez_setup', 'examples', 'tests'])
5049
EXTRAS_REQUIRE = {
5150
}
51+
PUBLISH_COMMAND = '{0} setup.py sdist bdist_wheel upload -r pypi'.format(
52+
sys.executable)
53+
GS_COMMAND = ('gs pyexcel-htmlr v0.5.1 ' +
54+
"Find 0.5.1 in changelog for more details")
55+
here = os.path.abspath(os.path.dirname(__file__))
56+
57+
58+
class PublishCommand(Command):
59+
"""Support setup.py upload."""
60+
61+
description = 'Build and publish the package on github and pypi'
62+
user_options = []
63+
64+
@staticmethod
65+
def status(s):
66+
"""Prints things in bold."""
67+
print('\033[1m{0}\033[0m'.format(s))
68+
69+
def initialize_options(self):
70+
pass
71+
72+
def finalize_options(self):
73+
pass
74+
75+
def run(self):
76+
try:
77+
self.status('Removing previous builds...')
78+
rmtree(os.path.join(here, 'dist'))
79+
except OSError:
80+
pass
81+
82+
self.status('Building Source and Wheel (universal) distribution...')
83+
if os.system(GS_COMMAND) == 0:
84+
os.system(PUBLISH_COMMAND)
85+
86+
sys.exit()
5287

5388

5489
def read_files(*files):
@@ -62,7 +97,7 @@ def read_files(*files):
6297

6398
def read(afile):
6499
"""Read a file into setup"""
65-
with open(afile, 'r') as opened_file:
100+
with codecs.open(afile, 'r', 'utf-8') as opened_file:
66101
content = filter_out_test_code(opened_file)
67102
content = "".join(list(content))
68103
return content
@@ -110,5 +145,9 @@ def filter_out_test_code(file_handle):
110145
packages=PACKAGES,
111146
include_package_data=True,
112147
zip_safe=False,
113-
classifiers=CLASSIFIERS
148+
classifiers=CLASSIFIERS,
149+
setup_requires=['gease'],
150+
cmdclass={
151+
'publish': PublishCommand,
152+
}
114153
)

test.bat

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

test.sh

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

0 commit comments

Comments
 (0)