Skip to content

Commit 6732e51

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

File tree

7 files changed

+68
-18
lines changed

7 files changed

+68
-18
lines changed

CHANGELOG.rst

+9
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

+1
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

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
project = u'pyexcel-xlsx'
2323
copyright = u'2015-2017 Onni Software Ltd.'
24-
version = '0.5.0.1'
25-
release = '0.5.0.1'
24+
version = '0.5.1'
25+
release = '0.5.1'
2626
exclude_patterns = []
2727
pygments_style = 'sphinx'
2828
html_theme = 'default'

pyexcel_xlsx.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
overrides: "pyexcel.yaml"
22
name: "pyexcel-xlsx"
33
nick_name: xlsx
4-
version: 0.5.0.1
5-
current_version: 0.5.0.1
6-
release: 0.5.0.1
4+
version: 0.5.1
5+
current_version: 0.5.1
6+
release: 0.5.1
77
file_type: xlsx
88
dependencies:
99
- openpyxl>=2.4.4

setup.py

+51-11
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
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-xlsx'
99
AUTHOR = 'C.W.'
10-
VERSION = '0.5.0.1'
10+
VERSION = '0.5.1'
1111
1212
LICENSE = 'New BSD'
1313
DESCRIPTION = (
@@ -16,8 +16,8 @@
1616
''
1717
)
1818
URL = 'https://github.com/pyexcel/pyexcel-xlsx'
19-
DOWNLOAD_URL = '%s/archive/0.5.0.1.tar.gz' % URL
20-
FILES = ['README.rst', 'CHANGELOG.rst']
19+
DOWNLOAD_URL = '%s/archive/0.5.1.tar.gz' % URL
20+
FILES = ['README.rst', 'CHANGELOG.rst']
2121
KEYWORDS = [
2222
'xlsx'
2323
'python'
@@ -47,6 +47,42 @@
4747
PACKAGES = find_packages(exclude=['ez_setup', 'examples', 'tests'])
4848
EXTRAS_REQUIRE = {
4949
}
50+
PUBLISH_COMMAND = '{0} setup.py sdist bdist_wheel upload -r pypi'.format(
51+
sys.executable)
52+
GS_COMMAND = ('gs pyexcel-xlsx v0.5.1 ' +
53+
"Find 0.5.1 in changelog for more details")
54+
here = os.path.abspath(os.path.dirname(__file__))
55+
56+
57+
class PublishCommand(Command):
58+
"""Support setup.py upload."""
59+
60+
description = 'Build and publish the package on github and pypi'
61+
user_options = []
62+
63+
@staticmethod
64+
def status(s):
65+
"""Prints things in bold."""
66+
print('\033[1m{0}\033[0m'.format(s))
67+
68+
def initialize_options(self):
69+
pass
70+
71+
def finalize_options(self):
72+
pass
73+
74+
def run(self):
75+
try:
76+
self.status('Removing previous builds...')
77+
rmtree(os.path.join(here, 'dist'))
78+
except OSError:
79+
pass
80+
81+
self.status('Building Source and Wheel (universal) distribution...')
82+
if os.system(GS_COMMAND) == 0:
83+
os.system(PUBLISH_COMMAND)
84+
85+
sys.exit()
5086

5187

5288
def read_files(*files):
@@ -60,7 +96,7 @@ def read_files(*files):
6096

6197
def read(afile):
6298
"""Read a file into setup"""
63-
with open(afile, 'r') as opened_file:
99+
with codecs.open(afile, 'r', 'utf-8') as opened_file:
64100
content = filter_out_test_code(opened_file)
65101
content = "".join(list(content))
66102
return content
@@ -108,5 +144,9 @@ def filter_out_test_code(file_handle):
108144
packages=PACKAGES,
109145
include_package_data=True,
110146
zip_safe=False,
111-
classifiers=CLASSIFIERS
147+
classifiers=CLASSIFIERS,
148+
setup_requires=['gease'],
149+
cmdclass={
150+
'publish': PublishCommand,
151+
}
112152
)

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_xlsx --cover-package tests --with-doctest --doctest-extension=.rst README.rst tests docs/source pyexcel_xlsx && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long
2+
nosetests --with-coverage --cover-package pyexcel_xlsx --cover-package tests --with-doctest --doctest-extension=.rst README.rst tests docs/source pyexcel_xlsx && 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_xlsx --cover-package tests --with-doctest --doctest-extension=.rst README.rst tests docs/source pyexcel_xlsx && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long
2+
nosetests --with-coverage --cover-package pyexcel_xlsx --cover-package tests --with-doctest --doctest-extension=.rst README.rst tests docs/source pyexcel_xlsx && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long

0 commit comments

Comments
 (0)