Skip to content

Commit 198df29

Browse files
committed
Merge branch 'develop'
2 parents 6c1f3b7 + 82dfcb4 commit 198df29

25 files changed

+263
-443
lines changed

.coveragerc

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[run]
2+
plugins = Cython.Coverage
3+
source = bencoder
4+
5+
[report]
6+
exclude_lines =
7+
pragma: no cover
8+
9+
def __repr__
10+
11+
raise AssertionError
12+
raise NotImplementedError
13+
14+
if 0:
15+
if __name__ == .__main__.:

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ __pycache__/
99
# Distribution / packaging
1010
.Python
1111
env/
12+
venv/
1213
build/
1314
develop-eggs/
1415
dist/
@@ -24,6 +25,8 @@ var/
2425
*.egg-info/
2526
.installed.cfg
2627
*.egg
28+
*.whl
29+
.python-version
2730

2831
# PyInstaller
2932
# Usually these files are written by a python script from a template

.gitmodules

-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
[submodule "terryfy"]
2-
path = terryfy
3-
url = https://github.com/MacPython/terryfy.git

.travis.yml

+26-15
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,42 @@
1-
language:
2-
- objective-c
3-
1+
os: osx
2+
language: generic
43
env:
5-
matrix:
6-
- VERSION=2.7.11
7-
- VERSION=3.3.5
8-
- VERSION=3.4.4
9-
- VERSION=3.5.1
4+
- VERSION=2.7
5+
- VERSION=3.3
6+
- VERSION=3.4
7+
- VERSION=3.5
8+
9+
matrix:
10+
include:
11+
- sudo: required
12+
os: linux
13+
services:
14+
- docker
15+
env: DOCKER_IMAGE=quay.io/pypa/manylinux1_x86_64
16+
- sudo: required
17+
os: linux
18+
services:
19+
- docker
20+
env: DOCKER_IMAGE=quay.io/pypa/manylinux1_i686
21+
PRE_CMD=linux32
1022

1123
install:
12-
- source terryfy/library_installers.sh
13-
- clean_builds
14-
- get_python_environment macpython $VERSION venv
15-
- pip install --upgrade pip wheel cython
24+
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then source ci/travis_osx_install.sh; fi
25+
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then source ci/travis_linux_install.sh; fi
1626

1727
script:
18-
- python setup.py test
28+
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then source ci/travis_osx_script.sh; fi
29+
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then source ci/travis_linux_script.sh; fi
1930

2031
after_success:
21-
- pip wheel . -w wheelhouse/
2232
- ls wheelhouse/
33+
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then bash <(curl -s https://codecov.io/bash); fi
2334

2435
deploy:
2536
provider: releases
2637
api_key:
2738
secure: PQSvEpo4Ec3u52FflZsc4M+RLGpToh3w6ej+XwEYKaSsfdXSAA936gXx7BWYy0rZrPT3RFfUjb63wGTfM3sf54cbvVMViPd/7L3DnYPaSsO1lCKdHPkcXV9tXHcWjDw7o0E9dviWXcpptR4Z7z73pE4yYY06e+SzBpROpiWSl9fB62I+DkIvBtfKjcLkvsSf86gtuysTw+v5aeqWtusHuRETI2/mtYwKu3ERICWzWzn9kWL4EWf+2y9uXFa8oz7faUsdK1uxc9xDMJLXtIErg71+Lg0s2KqduOmmGSB03APxMe0/4sh8+Do9yEdh677VGV4KbY5qzeKffjXEFp7Wj7ZG+w1WsmnxTHKiuFdJRbswuSHZhnf3EHiBbC0vwHAPuHp7720bdtTH0GmhniSLu6FnZohbnSaDlTXJaXgqxuDMyrVE5lSjMy1v/hUW6tj6ewQmpcheXMgpArX3fNiUNzHgFp21wTznHAlo+E4q7JC9a5QaV/uONbiLgETqlirRz0jTMfKxp6xQUjEJU6jE1anLVO9JuZkb9PqN99TFjrlzv6TPhSQnzVausQD/VouHYJUXer4yuK7OHZO4JoVm8iSfleQ4XaNnxzU4U6CRzJnaGJfSSa4u9kdoAI7bVvxF0hEQ9vDEV4F8Ze6aIAX5/v8G919x+hvkGjURACuR7oE=
28-
file: wheelhouse/*.whl
39+
file: wheelhouse/bencoder*.whl
2940
file_glob: true
3041
skip_cleanup: true
3142
on:

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
include bencoder.pyx README.rst LICENSE
1+
include bencoder.c bencoder.pyx README.rst pytest.ini LICENSE
22
recursive-include tests *

README.rst

+15-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,18 @@ Bencoder.pyx
33

44
A fast bencode implementation in Cython supports both Python2 & Python3 .
55

6-
.. image:: https://travis-ci.org/whtsky/bencoder.pyx.svg?branch=master
6+
.. image:: https://img.shields.io/travis/whtsky/bencoder.pyx/master.svg?maxAge=3600&label=macOS
77
:target: https://travis-ci.org/whtsky/bencoder.pyx
8+
.. image:: https://img.shields.io/appveyor/ci/whtsky/bencoder.pyx/master.svg?maxAge=3600&label=Windows
9+
:target: https://ci.appveyor.com/project/whtsky/bencoder.pyx
10+
.. image:: https://semaphoreci.com/api/v1/whtsky/bencoder-pyx/branches/master/shields_badge.svg
11+
:target: https://semaphoreci.com/whtsky/bencoder-pyx
812

9-
.. image:: https://ci.appveyor.com/api/projects/status/ur6vy8wdj789oxqv/branch/master?svg=true
10-
:target: https://ci.appveyor.com/project/whtsky/bencoder-pyx
13+
14+
.. image:: https://img.shields.io/travis/whtsky/bencoder.pyx/master.svg?maxAge=3600&label=wheels
15+
:target: https://travis-ci.org/whtsky/bencoder.pyx
16+
.. image:: https://codecov.io/gh/whtsky/bencoder.pyx/branch/master/graph/badge.svg
17+
:target: https://codecov.io/gh/whtsky/bencoder.pyx
1118

1219
Install
1320
-------
@@ -36,6 +43,11 @@ Usage
3643
ChangeLog
3744
----------
3845

46+
Version 1.1.2
47+
~~~~~~~~~~~~~~~
48+
49+
+ Support encode large int
50+
3951
Version 1.1.0
4052
~~~~~~~~~~~~~~~
4153

appveyor.yml

+30-76
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,37 @@
1+
version: '{branch}-{build}'
2+
cache:
3+
- '%LOCALAPPDATA%\pip\Cache'
14
environment:
2-
global:
3-
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
4-
# /E:ON and /V:ON options are not enabled in the batch script intepreter
5-
# See: http://stackoverflow.com/a/13751649/163740
6-
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_env.cmd"
7-
8-
matrix:
9-
10-
# Pre-installed Python versions, which Appveyor may upgrade to
11-
# a later point release.
12-
# See: http://www.appveyor.com/docs/installed-software#python
13-
14-
- PYTHON: "C:\\Python27"
15-
PYTHON_VERSION: "2.7.x" # currently 2.7.9
16-
PYTHON_ARCH: "32"
17-
18-
- PYTHON: "C:\\Python27-x64"
19-
PYTHON_VERSION: "2.7.x" # currently 2.7.9
20-
PYTHON_ARCH: "64"
21-
22-
- PYTHON: "C:\\Python33"
23-
PYTHON_VERSION: "3.3.x" # currently 3.3.5
24-
PYTHON_ARCH: "32"
25-
26-
- PYTHON: "C:\\Python33-x64"
27-
PYTHON_VERSION: "3.3.x" # currently 3.3.5
28-
PYTHON_ARCH: "64"
29-
30-
- PYTHON: "C:\\Python34"
31-
PYTHON_VERSION: "3.4.x" # currently 3.4.3
32-
PYTHON_ARCH: "32"
33-
34-
- PYTHON: "C:\\Python34-x64"
35-
PYTHON_VERSION: "3.4.x" # currently 3.4.3
36-
PYTHON_ARCH: "64"
37-
38-
# Python versions not pre-installed
39-
40-
# Python 2.6.6 is the latest Python 2.6 with a Windows installer
41-
# See: https://github.com/ogrisel/python-appveyor-demo/issues/10
42-
43-
- PYTHON: "C:\\Python266"
44-
PYTHON_VERSION: "2.6.6"
45-
PYTHON_ARCH: "32"
46-
47-
- PYTHON: "C:\\Python266-x64"
48-
PYTHON_VERSION: "2.6.6"
49-
PYTHON_ARCH: "64"
50-
51-
- PYTHON: "C:\\Python35"
52-
PYTHON_VERSION: "3.5.0"
53-
PYTHON_ARCH: "32"
54-
55-
- PYTHON: "C:\\Python35-x64"
56-
PYTHON_VERSION: "3.5.0"
57-
PYTHON_ARCH: "64"
58-
5+
password:
6+
secure: pp1j5lAB9NN8ZDasgY+oxoGrNw0+4gGzbNZmHVwJkCzUyrNBP5ZIuCrwjmx4q6ifg7RMiE3bVt9MljFCJh3XpsvVOAcx+AGKsHSjtXd40HM=
597
init:
60-
- "ECHO Python %PYTHON_VERSION% (%PYTHON_ARCH%bit) from %PYTHON%"
8+
- ps: "ls C:/Python*"
619

6210
install:
63-
# Install Python (from the official .msi of http://python.org) and pip when
64-
# not already installed.
65-
- ps: if (-not(Test-Path($env:PYTHON))) { & appveyor\install.ps1 }
66-
- "%PYTHON%\\Scripts\\pip install --disable-pip-version-check --user --upgrade pip wheel cython"
11+
- choco install python.pypy > pypy-inst.log 2>&1 || (type pypy-inst.log & exit /b 1)
12+
- SET PATH=C:\Python35;C:\Python35\scripts;C:\tools\pypy\pypy;%PATH%
13+
- echo "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 > "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\vcvars64.bat"
14+
- pip install -r dev-requirements.txt
6715

68-
build_script:
69-
- "%PYTHON%\\python setup.py install"
16+
build: off
7017

7118
test_script:
72-
- "%PYTHON%\\python setup.py test"
73-
74-
after_test:
75-
- "%PYTHON%\\python setup.py bdist_wheel bdist_wininst bdist_msi"
76-
- ps: "ls dist"
77-
78-
artifacts:
79-
- path: dist\*
80-
81-
#on_success:
82-
# - TODO: upload the content of dist/*.whl to a public wheelhouse
83-
#
19+
- tox
20+
21+
on_success:
22+
- pip install codecov
23+
- codecov
24+
- tox -c tox-wheels.ini
25+
26+
deploy_script:
27+
- echo [distutils] > %USERPROFILE%\\.pypirc
28+
- echo index-servers = >> %USERPROFILE%\\.pypirc
29+
- echo pypi >> %USERPROFILE%\\.pypirc
30+
- echo [pypi] >> %USERPROFILE%\\.pypirc
31+
- echo username=whtsky >> %USERPROFILE%\\.pypirc
32+
- echo password=%password% >> %USERPROFILE%\\.pypirc
33+
- set HOME=%USERPROFILE%
34+
- pip install twine
35+
- ps: if($env:APPVEYOR_REPO_TAG -eq $TRUE) { "twine upload wheelhouse/bencoder*.whl" }
36+
37+
deploy : on

0 commit comments

Comments
 (0)