Skip to content

Commit 7390131

Browse files
committed
Update: ready to release version 0.0.2
1 parent 5c25cac commit 7390131

File tree

11 files changed

+92
-211
lines changed

11 files changed

+92
-211
lines changed

.gitignore

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -261,25 +261,8 @@ tags
261261
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
262262
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
263263

264-
# User-specific stuff
265-
.idea/**/workspace.xml
266-
.idea/**/tasks.xml
267-
.idea/**/usage.statistics.xml
268-
.idea/**/dictionaries
269-
.idea/**/shelf
270-
271-
# Sensitive or high-churn files
272-
.idea/**/dataSources/
273-
.idea/**/dataSources.ids
274-
.idea/**/dataSources.local.xml
275-
.idea/**/sqlDataSources.xml
276-
.idea/**/dynamic.xml
277-
.idea/**/uiDesigner.xml
278-
.idea/**/dbnavigator.xml
279-
280-
# Gradle
281-
.idea/**/gradle.xml
282-
.idea/**/libraries
264+
# IDE
265+
.idea/
283266

284267
# CMake
285268
cmake-build-*/

.travis.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,11 @@ language: python
44
notifications:
55
email: false
66
python:
7-
- &pypy2 pypy2.7-6.0
8-
- &pypy3 pypy3.5-6.0
97
- 3.8-dev
108
- 3.7
119
- 3.6
1210
- 3.5
13-
- 2.7
1411
before_install:
15-
- if [[ $TRAVIS_PYTHON_VERSION == "2.6" ]]; then pip install flake8==2.6.2; fi
1612
- if [[ -f min_requirements.txt && "$MINREQ" -eq 1 ]]; then
1713
mv min_requirements.txt requirements.txt ;
1814
fi

CHANGELOG.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ name = 'pypi'
77
python_version= '3.6'
88

99
[packages]
10+
selenium = "*"
1011

1112
[dev-packages]
1213
nose = "*"

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# snapshot-selenium
2+
3+
![http://travis-ci.org/pyecharts/snapshot-selenium](https://api.travis-ci.org/pyecharts/snapshot-selenium.svg) ![https://codecov.io/github/pyecharts/snapshot-selenium](https://codecov.io/github/pyecharts/snapshot-selenium/coverage.png)
4+
5+
## Installation
6+
7+
You can install snapshot-selenium via pip:
8+
9+
```bash
10+
$ pip install snapshot-selenium
11+
```
12+
13+
or clone it and install it:
14+
15+
```bash
16+
$ git clone https://github.com/pyecharts/snapshot-selenium.git
17+
$ cd snapshot-selenium
18+
$ pip install -r requirements.txt
19+
$ python setup.py install
20+
```

README.rst

Lines changed: 0 additions & 33 deletions
This file was deleted.

docs/source/conf.py

Lines changed: 0 additions & 62 deletions
This file was deleted.

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
selenium

setup.py

Lines changed: 44 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010

1111
from setuptools import Command, setup, find_packages
1212

13-
PY2 = sys.version_info[0] == 2
14-
PY26 = PY2 and sys.version_info[1] < 7
15-
PY33 = sys.version_info < (3, 4)
16-
1713
# Work around mbcs bug in distutils.
1814
# http://bugs.python.org/issue10945
1915
# This work around is only if a project supports Python < 3.4
@@ -22,67 +18,57 @@
2218
try:
2319
lc = locale.getlocale()
2420
pf = platform.system()
25-
if pf != 'Windows' and lc == (None, None):
26-
locale.setlocale(locale.LC_ALL, 'C.UTF-8')
21+
if pf != "Windows" and lc == (None, None):
22+
locale.setlocale(locale.LC_ALL, "C.UTF-8")
2723
except (ValueError, UnicodeError, locale.Error):
28-
locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
29-
30-
NAME = 'snapshot-selenium'
31-
AUTHOR = 'C.W.'
32-
VERSION = '0.0.1'
33-
EMAIL = 'info@pyecharts.com'
34-
LICENSE = 'MIT'
35-
DESCRIPTION = (
36-
'Render echarts using selenium'
37-
)
38-
URL = 'https://github.com/pyecharts/snapshot-selenium'
39-
DOWNLOAD_URL = '%s/archive/0.0.1.tar.gz' % URL
40-
FILES = ['README.rst', 'CHANGELOG.rst']
41-
KEYWORDS = [
42-
'python',
43-
]
24+
locale.setlocale(locale.LC_ALL, "en_US.UTF-8")
25+
26+
NAME = "snapshot-selenium"
27+
AUTHOR = "pyecharts dev team"
28+
VERSION = "0.0.1"
29+
EMAIL = "info@pyecharts.com"
30+
LICENSE = "MIT"
31+
DESCRIPTION = "Render echarts using selenium"
32+
URL = "https://github.com/pyecharts/snapshot-selenium"
33+
DOWNLOAD_URL = "%s/archive/0.0.1.tar.gz" % URL
34+
FILES = ["README.md"]
35+
4436

4537
CLASSIFIERS = [
46-
'Topic :: Software Development :: Libraries',
47-
'Programming Language :: Python',
48-
'Intended Audience :: Developers',
49-
'Programming Language :: Python :: 2.6',
50-
'Programming Language :: Python :: 2.7',
51-
'Programming Language :: Python :: 3.3',
52-
'Programming Language :: Python :: 3.4',
53-
'Programming Language :: Python :: 3.5',
54-
'Programming Language :: Python :: 3.6',
38+
"Topic :: Software Development :: Libraries",
39+
"Programming Language :: Python",
40+
"Intended Audience :: Developers",
41+
"Programming Language :: Python :: 3.5",
42+
"Programming Language :: Python :: 3.6",
43+
"Programming Language :: Python :: 3.7",
5544
]
5645

57-
INSTALL_REQUIRES = [
58-
]
46+
INSTALL_REQUIRES = ["selenium"]
5947
SETUP_COMMANDS = {}
6048

6149

62-
PACKAGES = find_packages(exclude=['ez_setup', 'examples', 'tests'])
50+
PACKAGES = find_packages(exclude=["ez_setup", "examples", "tests"])
6351
EXTRAS_REQUIRE = {}
6452
# You do not need to read beyond this line
65-
PUBLISH_COMMAND = '{0} setup.py sdist bdist_wheel upload -r pypi'.format(
66-
sys.executable)
67-
GS_COMMAND = ('gs snapshot-selenium v0.0.1 ' +
68-
"Find 0.0.1 in changelog for more details")
69-
NO_GS_MESSAGE = ('Automatic github release is disabled. ' +
70-
'Please install gease to enable it.')
71-
UPLOAD_FAILED_MSG = (
72-
'Upload failed. please run "%s" yourself.' % PUBLISH_COMMAND)
53+
PUBLISH_COMMAND = "{0} setup.py sdist bdist_wheel upload -r pypi".format(sys.executable)
54+
GS_COMMAND = "gs snapshot-selenium v0.0.1 " + "Find 0.0.1 in changelog for more details"
55+
NO_GS_MESSAGE = (
56+
"Automatic github release is disabled. " + "Please install gease to enable it."
57+
)
58+
UPLOAD_FAILED_MSG = 'Upload failed. please run "%s" yourself.' % PUBLISH_COMMAND
7359
HERE = os.path.abspath(os.path.dirname(__file__))
7460

7561

7662
class PublishCommand(Command):
7763
"""Support setup.py upload."""
7864

79-
description = 'Build and publish the package on github and pypi'
65+
description = "Build and publish the package on github and pypi"
8066
user_options = []
8167

8268
@staticmethod
8369
def status(s):
8470
"""Prints things in bold."""
85-
print('\033[1m{0}\033[0m'.format(s))
71+
print("\033[1m{0}\033[0m".format(s))
8672

8773
def initialize_options(self):
8874
pass
@@ -92,14 +78,14 @@ def finalize_options(self):
9278

9379
def run(self):
9480
try:
95-
self.status('Removing previous builds...')
96-
rmtree(os.path.join(HERE, 'dist'))
97-
rmtree(os.path.join(HERE, 'build'))
98-
rmtree(os.path.join(HERE, 'snapshot_selenium.egg-info'))
81+
self.status("Removing previous builds...")
82+
rmtree(os.path.join(HERE, "dist"))
83+
rmtree(os.path.join(HERE, "build"))
84+
rmtree(os.path.join(HERE, "snapshot_selenium.egg-info"))
9985
except OSError:
10086
pass
10187

102-
self.status('Building Source and Wheel (universal) distribution...')
88+
self.status("Building Source and Wheel (universal) distribution...")
10389
run_status = True
10490
if has_gease():
10591
run_status = os.system(GS_COMMAND) == 0
@@ -112,9 +98,7 @@ def run(self):
11298
sys.exit()
11399

114100

115-
SETUP_COMMANDS.update({
116-
'publish': PublishCommand
117-
})
101+
SETUP_COMMANDS.update({"publish": PublishCommand})
118102

119103

120104
def has_gease():
@@ -125,6 +109,7 @@ def has_gease():
125109
"""
126110
try:
127111
import gease # noqa
112+
128113
return True
129114
except ImportError:
130115
return False
@@ -142,7 +127,7 @@ def read_files(*files):
142127
def read(afile):
143128
"""Read a file into setup"""
144129
the_relative_file = os.path.join(HERE, afile)
145-
with codecs.open(the_relative_file, 'r', 'utf-8') as opened_file:
130+
with codecs.open(the_relative_file, "r", "utf-8") as opened_file:
146131
content = filter_out_test_code(opened_file)
147132
content = "".join(list(content))
148133
return content
@@ -151,11 +136,11 @@ def read(afile):
151136
def filter_out_test_code(file_handle):
152137
found_test_code = False
153138
for line in file_handle.readlines():
154-
if line.startswith('.. testcode:'):
139+
if line.startswith(".. testcode:"):
155140
found_test_code = True
156141
continue
157142
if found_test_code is True:
158-
if line.startswith(' '):
143+
if line.startswith(" "):
159144
continue
160145
else:
161146
empty_line = line.strip()
@@ -165,14 +150,14 @@ def filter_out_test_code(file_handle):
165150
found_test_code = False
166151
yield line
167152
else:
168-
for keyword in ['|version|', '|today|']:
153+
for keyword in ["|version|", "|today|"]:
169154
if keyword in line:
170155
break
171156
else:
172157
yield line
173158

174159

175-
if __name__ == '__main__':
160+
if __name__ == "__main__":
176161
setup(
177162
test_suite="tests",
178163
name=NAME,
@@ -184,13 +169,12 @@ def filter_out_test_code(file_handle):
184169
download_url=DOWNLOAD_URL,
185170
long_description=read_files(*FILES),
186171
license=LICENSE,
187-
keywords=KEYWORDS,
188172
extras_require=EXTRAS_REQUIRE,
189-
tests_require=['nose'],
173+
tests_require=["nose"],
190174
install_requires=INSTALL_REQUIRES,
191175
packages=PACKAGES,
192176
include_package_data=True,
193177
zip_safe=False,
194178
classifiers=CLASSIFIERS,
195-
cmdclass=SETUP_COMMANDS
179+
cmdclass=SETUP_COMMANDS,
196180
)

snapshot_selenium/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
__version__ = "0.0.1"
2-
__author__ = "C.W."
2+
__author__ = "pyecharts dev team"

0 commit comments

Comments
 (0)