Skip to content

Commit 72e0a82

Browse files
authored
Merge pull request #78 from chaimleib/dev
Dev -> master (3.0.1)
2 parents 5061458 + 94fb992 commit 72e0a82

File tree

6 files changed

+84
-63
lines changed

6 files changed

+84
-63
lines changed

.travis.yml

+19-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
language: python
2-
python:
3-
- "2.7"
4-
- "3.4"
5-
- "3.5"
6-
- "3.6"
2+
matrix:
3+
include:
4+
- python: 2.7
5+
- python: 3.4
6+
- python: 3.5
7+
- python: 3.6
8+
- python: 3.7
9+
dist: xenial
10+
sudo: true
11+
- python: 3.8-dev
12+
env: FAILOK=y
13+
dist: xenial
14+
sudo: true
15+
allow_failures:
16+
- env: FAILOK=y
717
install:
8-
- make deps-dev
9-
- pip install coverage
18+
- make deps-dev
19+
- pip install coverage
1020
script:
11-
coverage run --source=intervaltree setup.py develop test
21+
coverage run --source=intervaltree setup.py develop test
1222
after_success:
13-
coverage report
23+
coverage report

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Change log
22

3+
## Version 3.0.1
4+
- Added:
5+
- Travis testing for 3.7 and 3.8-dev. These needed OpenSSL, sudo and Xenial. 3.8-dev is allowed to fail.
6+
- Fixed:
7+
- PyPI wasn't rendering markdown because I didn't tell it what format to use.
8+
- Python 2 wasn't installing via pip because of a new utils package. It has been zapped.
9+
- Maintainers:
10+
- TestPyPI version strings use `.postN` as the suffix instead of `bN`, and `N` counts from the latest tagged commit, which should be the last release
11+
- Install from TestPyPI works via `make install-testpypi`
12+
313
## Version 3.0.0
414
- Breaking:
515
- `search(begin, end, strict)` has been replaced with `at(point)`, `overlap(begin, end)`, and `envelop(begin, end)`

Makefile

+28-4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ PYTHON_MINORS:=$(shell \
2525
# See http://peterdowns.com/posts/first-time-with-pypi.html
2626
PYPI=pypitest
2727

28+
TWINE=$(shell \
29+
if twine --version &>/dev/null; then \
30+
echo twine ;\
31+
elif [[ -x ~/Library/Python/3.7/bin/twine ]]; then \
32+
echo '~/Library/Python/3.7/bin/twine' ;\
33+
else \
34+
echo twine ;\
35+
fi \
36+
)
37+
2838
# default target
2939
all: test
3040

@@ -55,7 +65,11 @@ clean-temps:
5565
rm -rf $(TEMPS)
5666

5767
install-testpypi:
58-
pip install --pre -i https://testpypi.python.org/pypi intervaltree
68+
pip install \
69+
--no-cache-dir \
70+
--index-url https://test.pypi.org/simple/ \
71+
--extra-index-url https://pypi.org/simple \
72+
intervaltree
5973

6074
install-pypi:
6175
pip install intervaltree
@@ -75,8 +89,13 @@ release:
7589
$(eval PYPI=pypi)
7690

7791
# Build source distribution
78-
sdist-upload:
79-
PYPI=$(PYPI) python setup.py sdist upload -r $(PYPI)
92+
sdist-upload: distclean deps-dev
93+
PYPI=$(PYPI) python setup.py sdist
94+
if [[ "$(PYPI)" == pypitest ]]; then \
95+
$(TWINE) upload --repository-url https://test.pypi.org/legacy/ dist/*; \
96+
else \
97+
$(TWINE) upload dist/*; \
98+
fi
8099

81100
deps-dev: pyenv-install-versions
82101

@@ -88,7 +107,12 @@ pyenv-is-installed:
88107

89108
pyenv-install-versions: pyenv-is-installed
90109
for pyver in $(PYTHONS); do (echo N | pyenv install $$pyver) || true; done
91-
for pyver in $(PYTHONS); do export PYENV_VERSION=$$pyver; pip install -U pip; pip install -U pytest; done | grep -v 'Requirement already satisfied, skipping upgrade'
110+
for pyver in $(PYTHONS); do \
111+
export PYENV_VERSION=$$pyver; \
112+
pip install -U pip; \
113+
pip install -U pytest; \
114+
pip install -U twine; \
115+
done | grep -v 'Requirement already satisfied, skipping upgrade'
92116
pyenv rehash
93117

94118
# for debugging the Makefile

setup.py

+27-9
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,39 @@
2222
limitations under the License.
2323
"""
2424
from __future__ import absolute_import
25+
import os
2526
from sys import exit
2627
from setuptools import setup
2728
from setuptools.command.test import test as TestCommand
28-
29-
from utils import version
29+
import subprocess
3030

3131
## CONFIG
32-
target_version = '3.0.0'
32+
target_version = '3.0.1'
33+
34+
35+
def version_info(target_version):
36+
is_dev_version = 'PYPI' in os.environ and os.environ['PYPI'] == 'pypitest'
37+
if is_dev_version:
38+
p = subprocess.Popen('git describe --tag'.split(), stdout=subprocess.PIPE)
39+
git_describe = p.communicate()[0].strip()
40+
release, build, commitish = git_describe.split('-')
41+
version = "{0}.post{1}".format(release, build)
42+
else: # This is a RELEASE version
43+
version = target_version
44+
return {
45+
'is_dev_version': is_dev_version,
46+
'version': version,
47+
'target_version': target_version
48+
}
49+
3350

34-
version_info = version.version_info(target_version)
35-
if version_info['is_dev_version']:
51+
vinfo = version_info(target_version)
52+
if vinfo['is_dev_version']:
3653
print("This is a DEV version")
37-
print("Target: {target_version}\n".format(**version_info))
54+
print("Target: {target_version}\n".format(**vinfo))
3855
else:
3956
print("!!!>>> This is a RELEASE version <<<!!!\n")
40-
print("Version: {version}".format(**version_info))
57+
print("Version: {version}".format(**vinfo))
4158

4259
with open('README.md', 'r') as fh:
4360
long_description = fh.read()
@@ -59,10 +76,11 @@ def run_tests(self):
5976
## Run setuptools
6077
setup(
6178
name='intervaltree',
62-
version=version_info['version'],
79+
version=vinfo['version'],
6380
install_requires=['sortedcontainers >= 2.0, < 3.0'],
6481
description='Editable interval tree data structure for Python 2 and 3',
6582
long_description=long_description,
83+
long_description_content_type='text/markdown',
6684
classifiers=[ # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
6785
'Development Status :: 4 - Beta',
6886
'Programming Language :: Python :: Implementation :: PyPy',
@@ -90,7 +108,7 @@ def run_tests(self):
90108
author='Chaim Leib Halbert, Konstantin Tretyakov',
91109
author_email='[email protected]',
92110
url='https://github.com/chaimleib/intervaltree',
93-
download_url='https://github.com/chaimleib/intervaltree/tarball/{version}'.format(**version_info),
111+
download_url='https://github.com/chaimleib/intervaltree/tarball/{version}'.format(**vinfo),
94112
license="Apache License, Version 2.0",
95113
packages=["intervaltree"],
96114
include_package_data=True,

utils/__init__.py

Whitespace-only changes.

utils/version.py

-41
This file was deleted.

0 commit comments

Comments
 (0)