8000 :handshake: take latest code from setupmobans and release 0.4.1 :egg:… · pyexcel/pyexcel-xlsxw@b1dd01a · GitHub
[go: up one dir, main page]

Skip to content

Commit b1dd01a

Browse files
committed
🤝 take latest code from setupmobans and release 0.4.1 🥚 🎡, which carries LICENSE file, pyexcel/pyexcel#103
1 parent 430f3a9 commit b1dd01a

File tree

6 files changed

+58
-16
lines changed

6 files changed

+58
-16
lines changed

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-xlsxw'
2222
copyright = u'2015-2017 Onni Software Ltd.'
23-
version = '0.4.0'
24-
release = '0.4.0'
23+
version = '0.4.1'
24+
release = '0.4.1'
2525
exclude_patterns = []
2626
pygments_style = 'sphinx'
2727
html_theme = 'default'

pyexcel_xlsxw.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
overrides: "pyexcel.yaml"
22
name: "pyexcel-xlsxw"
33
nick_name: xlsxw
4-
version: 0.4.0
5-
release: 0.4.0
4+
version: 0.4.1
5+
current_version: 0.4.1
6+
release: 0.4.1
67
file_type: xlsx
78
dependencies:
89
- XlsxWriter==0.9.3

setup.py

Lines changed: 50 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
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-xlsxw'
99
AUTHOR = 'C.W.'
10-
VERSION = ''
10+
VERSION = '0.4.1'
1111
EMAIL = 'wangc_2011@hotmail.com'
1212
LICENSE = 'New BSD'
1313
DESCRIPTION = (
1414
'A wrapper library to write data in xlsx and xlsm format' +
1515
''
1616
)
1717
URL = 'https://github.com/pyexcel/pyexcel-xlsxw'
18-
DOWNLOAD_URL = '%s/archive/0.4.0.tar.gz' % URL
18+
DOWNLOAD_URL = '%s/archive/0.4.1.tar.gz' % URL
1919
FILES = ['README.rst', 'CHANGELOG.rst']
2020
KEYWORDS = [
2121
'xlsx'
@@ -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-xlsxw v0.4.1 ' +
53+
"Find 0.4.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

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

0 commit comments

Comments
 (0)
0