Skip to content

Commit 9e9f61a

Browse files
committed
🤝 take latest code from setupmobans, carrying LICENSE file, pyexcel/pyexcel#103, update docs pyexcel/pyexcel#104
1 parent f002daf commit 9e9f61a

File tree

7 files changed

+72
-30
lines changed

7 files changed

+72
-30
lines changed

README.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ pyexcel-pygal - Let you focus on presentation with pygal
55
.. image:: https://raw.githubusercontent.com/pyexcel/pyexcel.github.io/master/images/patreon.png
66
:target: https://www.patreon.com/pyexcel
77

8-
.. image:: https://api.travis-ci.org/pyexcel/pyexcel-pygal.svg?branch=master
9-
:target: http://travis-ci.org/pyexcel/pyexcel-pygal
8+
.. image:: https://api.travis-ci.org/pyexcel-renderers/pyexcel-pygal.svg?branch=master
9+
:target: http://travis-ci.org/pyexcel-renderers/pyexcel-pygal
1010

11-
.. image:: https://codecov.io/gh/pyexcel/pyexcel-pygal/branch/master/graph/badge.svg
12-
:target: https://codecov.io/gh/pyexcel/pyexcel-pygal
11+
.. image:: https://codecov.io/gh/pyexcel-renderers/pyexcel-pygal/branch/master/graph/badge.svg
12+
:target: https://codecov.io/gh/pyexcel-renderers/pyexcel-pygal
1313

1414
.. image:: https://img.shields.io/gitter/room/gitterHQ/gitter.svg
1515
:target: https://gitter.im/pyexcel/Lobby
@@ -25,7 +25,7 @@ product, please `support me on patreon <https://www.patreon.com/bePatron?u=55376
2525
maintain the project and develop it further.
2626

2727
If you are an individual, you are welcome to support me too on patreon and for however long
28-
you feel like to. As a patreon, you will receive
28+
you feel like. As a patreon, you will receive
2929
`early access to pyexcel related contents <https://www.patreon.com/pyexcel/posts>`_.
3030

3131
With your financial support, I will be able to invest
@@ -44,7 +44,8 @@ Introduction
4444

4545
Installation
4646
================================================================================
47-
You can install it via pip:
47+
48+
You can install pyexcel-pygal via pip:
4849

4950
.. code-block:: bash
5051
@@ -55,7 +56,7 @@ or clone it and install it:
5556

5657
.. code-block:: bash
5758
58-
$ git clone https://github.com/pyexcel/pyexcel-pygal.git
59+
$ git clone https://github.com/pyexcel-renderers/pyexcel-pygal.git
5960
$ cd pyexcel-pygal
6061
$ python setup.py install
6162

docs/source/conf.py

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

2828
project = u'pyexcel-pygal'
2929
copyright = u'2015-2017 Onni Software Ltd.'
30-
version = '0.0.1'
31-
release = '0.0.1'
30+
version = '0.0.2'
31+
release = '0.0.2'
3232
exclude_patterns = []
3333
pygments_style = 'sphinx'
3434
html_theme = 'default'

docs/source/index.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
================================================================================
33

44
:Author: C.W.
5-
:Source code: http://github.com/pyexcel/pyexcel-pygal.git
6-
:Issues: http://github.com/pyexcel/pyexcel-pygal/issues
5+
:Source code: http://github.com/pyexcel-renderers/pyexcel-pygal.git
6+
:Issues: http://github.com/pyexcel-renderers/pyexcel-pygal/issues
77
:License: New BSD License
88
:Released: |version|
99
:Generated: |today|
@@ -20,7 +20,8 @@ on `github folder <https://github.com/pyexcel/pyexcel-pygal/tree/master/notebook
2020
Installation
2121
-------------
2222

23-
You can install it via pip:
23+
24+
You can install pyexcel-pygal via pip:
2425

2526
.. code-block:: bash
2627
@@ -31,7 +32,7 @@ or clone it and install it:
3132

3233
.. code-block:: bash
3334
34-
$ git clone https://github.com/pyexcel/pyexcel-pygal.git
35+
$ git clone https://github.com/pyexcel-renderers/pyexcel-pygal.git
3536
$ cd pyexcel-pygal
3637
$ python setup.py install
3738

pyexcel-pygal.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
overrides: "pyexcel.yaml"
2+
organisation: "pyexcel-renderers"
23
name: "pyexcel-pygal"
34
nick_name: "pygal"
4-
version: "0.0.1"
5-
current_version: "0.0.1"
6-
release: "0.0.1"
5+
version: "0.0.2"
6+
current_version: "0.0.2"
7+
release: "0.0.2"
78
dependencies:
89
- pygal
910
description: "draw simple svg chart via pygal"

setup.py

Lines changed: 51 additions & 12 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-pygal'
1211
AUTHOR = 'C.W.'
13-
VERSION = '0.0.1'
12+
VERSION = '0.0.2'
1413
EMAIL = 'wangc_2011@hotmail.com'
1514
LICENSE = 'New BSD'
1615
DESCRIPTION = (
1716
'draw simple svg chart via pygal' +
1817
''
1918
)
20-
URL = 'https://github.com/pyexcel/pyexcel-pygal'
21-
DOWNLOAD_URL = '%s/archive/0.0.1.tar.gz' % URL
22-
FILES = ['README.rst', 'CHANGELOG.rst']
19+
URL = 'https://github.com/pyexcel-renderers/pyexcel-pygal'
20+
DOWNLOAD_URL = '%s/archive/0.0.2.tar.gz' % URL
21+
FILES = ['README.rst', 'CHANGELOG.rst']
2322
KEYWORDS = [
2423
'python'
2524
]
@@ -47,6 +46,42 @@
4746
PACKAGES = find_packages(exclude=['ez_setup', 'examples', 'tests'])
4847
EXTRAS_REQUIRE = {
4948
}
49+
PUBLISH_COMMAND = '{0} setup.py sdist bdist_wheel upload -r pypi'.format(
50+
sys.executable)
51+
GS_COMMAND = ('gs pyexcel-pygal v0.0.2 ' +
52+
"Find 0.0.2 in changelog for more details")
53+
here = os.path.abspath(os.path.dirname(__file__))
54+
55+
56+
class PublishCommand(Command):
57+
"""Support setup.py upload."""
58+
59+
description = 'Build and publish the package on github and pypi'
60+
user_options = []
61+
62+
@staticmethod
63+
def status(s):
64+
"""Prints things in bold."""
65+
print('\033[1m{0}\033[0m'.format(s))
66+
67+
def initialize_options(self):
68+
pass
69+
70+
def finalize_options(self):
71+
pass
72+
73+
def run(self):
74+
try:
75+
self.status('Removing previous builds...')
76+
rmtree(os.path.join(here, 'dist'))
77+
except OSError:
78+
pass
79+
80+
self.status('Building Source and Wheel (universal) distribution...')
81+
if os.system(GS_COMMAND) == 0:
82+
os.system(PUBLISH_COMMAND)
83+
84+
sys.exit()
5085

5186

5287
def read_files(*files):
@@ -60,7 +95,7 @@ def read_files(*files):
6095

6196
def read(afile):
6297
"""Read a file into setup"""
63-
with open(afile, 'r') as opened_file:
98+
with codecs.open(afile, 'r', 'utf-8') as opened_file:
6499
content = filter_out_test_code(opened_file)
65100
content = "".join(list(content))
66101
return content
@@ -108,5 +143,9 @@ def filter_out_test_code(file_handle):
108143
packages=PACKAGES,
109144
include_package_data=True,
110145
zip_safe=False,
111-
classifiers=CLASSIFIERS
146+
classifiers=CLASSIFIERS,
147+
setup_requires=['gease'],
148+
cmdclass={
149+
'publish': PublishCommand,
150+
}
112151
)

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

0 commit comments

Comments
 (0)