-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🤝 take latest code from setupmobans and release 0.5.1 🥚 🎡, which carr…
…ies LICENSE file, pyexcel/pyexcel#103
- Loading branch information
Showing
7 changed files
with
68 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Auto generated by moban | ||
__version__ = '0.5.0' | ||
__version__ = '0.5.1' | ||
__author__ = 'C.W.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
try: | ||
from setuptools import setup, find_packages | ||
except ImportError: | ||
from ez_setup import use_setuptools | ||
use_setuptools() | ||
from setuptools import setup, find_packages | ||
# Template by setupmobans | ||
import os | ||
import sys | ||
import codecs | ||
from shutil import rmtree | ||
from setuptools import setup, find_packages, Command | ||
|
||
NAME = 'pyexcel-odsr' | ||
AUTHOR = 'C.W.' | ||
VERSION = '0.5.0' | ||
VERSION = '0.5.1' | ||
EMAIL = '[email protected]' | ||
LICENSE = 'New BSD' | ||
DESCRIPTION = ( | ||
|
@@ -16,8 +16,8 @@ | |
'' | ||
) | ||
URL = 'https://github.com/pyexcel/pyexcel-odsr' | ||
DOWNLOAD_URL = '%s/archive/0.5.0.tar.gz' % URL | ||
FILES = ['README.rst', 'CONTRIBUTORS.rst', 'CHANGELOG.rst'] | ||
DOWNLOAD_URL = '%s/archive/0.5.1.tar.gz' % URL | ||
FILES = ['README.rst', 'CONTRIBUTORS.rst', 'CHANGELOG.rst'] | ||
KEYWORDS = [ | ||
'excel', | ||
'ods', | ||
|
@@ -48,6 +48,42 @@ | |
PACKAGES = find_packages(exclude=['ez_setup', 'examples', 'tests']) | ||
EXTRAS_REQUIRE = { | ||
} | ||
PUBLISH_COMMAND = '{0} setup.py sdist bdist_wheel upload -r pypi'.format( | ||
sys.executable) | ||
GS_COMMAND = ('gs pyexcel-odsr v0.5.1 ' + | ||
"Find 0.5.1 in changelog for more details") | ||
here = os.path.abspath(os.path.dirname(__file__)) | ||
|
||
|
||
class PublishCommand(Command): | ||
"""Support setup.py upload.""" | ||
|
||
description = 'Build and publish the package on github and pypi' | ||
user_options = [] | ||
|
||
@staticmethod | ||
def status(s): | ||
"""Prints things in bold.""" | ||
print('\033[1m{0}\033[0m'.format(s)) | ||
|
||
def initialize_options(self): | ||
pass | ||
|
||
def finalize_options(self): | ||
pass | ||
|
||
def run(self): | ||
try: | ||
self.status('Removing previous builds...') | ||
rmtree(os.path.join(here, 'dist')) | ||
except OSError: | ||
pass | ||
|
||
self.status('Building Source and Wheel (universal) distribution...') | ||
if os.system(GS_COMMAND) == 0: | ||
os.system(PUBLISH_COMMAND) | ||
|
||
sys.exit() | ||
|
||
|
||
def read_files(*files): | ||
|
@@ -61,7 +97,7 @@ def read_files(*files): | |
|
||
def read(afile): | ||
"""Read a file into setup""" | ||
with open(afile, 'r') as opened_file: | ||
with codecs.open(afile, 'r', 'utf-8') as opened_file: | ||
content = filter_out_test_code(opened_file) | ||
content = "".join(list(content)) | ||
return content | ||
|
@@ -109,5 +145,9 @@ def filter_out_test_code(file_handle): | |
packages=PACKAGES, | ||
include_package_data=True, | ||
zip_safe=False, | ||
classifiers=CLASSIFIERS | ||
classifiers=CLASSIFIERS, | ||
setup_requires=['gease'], | ||
cmdclass={ | ||
'publish': PublishCommand, | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
pip freeze | ||
nosetests --with-cov --cover-package pyexcel_odsr --cover-package tests --with-doctest --doctest-extension=.rst README.rst tests docs/source pyexcel_odsr && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long | ||
nosetests --with-coverage --cover-package pyexcel_odsr --cover-package tests --with-doctest --doctest-extension=.rst README.rst tests docs/source pyexcel_odsr && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
pip freeze | ||
nosetests --with-cov --cover-package pyexcel_odsr --cover-package tests --with-doctest --doctest-extension=.rst README.rst tests docs/source pyexcel_odsr && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long | ||
nosetests --with-coverage --cover-package pyexcel_odsr --cover-package tests --with-doctest --doctest-extension=.rst README.rst tests docs/source pyexcel_odsr && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long |