Skip to content

Commit

Permalink
Merge pull request #504 from arcivanov/pyb_0.12.0
Browse files Browse the repository at this point in the history
Branch for 0.12.0
  • Loading branch information
arcivanov committed Oct 12, 2017
2 parents 7648c1e + ebae2d2 commit d0f8f80
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 338 deletions.
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
sudo: false
language: python
python:
- '2.6'
- '2.7'
- '3.3'
- '3.4'
- '3.5'
- '3.6'
- pypy
- '3.7-dev'
- 'pypy'
- 'pypy3'
addons:
apt_packages: [ pandoc ]
branches:
only:
- master
- doc/sphinxdoc
- 0.11
before_script:
- pip install coveralls
script:
Expand All @@ -28,6 +29,6 @@ deploy:
on:
branch: master
repo: pybuilder/pybuilder
python: '3.5'
python: '3.6'
password:
secure: QH11Nk1Mv6KVRr5L4z9dJfzDDxyUjkLJURWsJxYG0bGA8zxp7Tnfo1J5XDNRvT2bAxXSx0v5+C0y+0KE4z44z5wvE/hxHx9k+3PbETb1q1F1sVtWeA+i4cm7T7d4dh/9YfyfimcHNR/9U52qBpdSVjXqXcSzMzfgzhgFniGGJIU=
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ PyBuilder
[![Ready in backlog](https://badge.waffle.io/pybuilder/pybuilder.png?label=ready&title=Ready)](https://waffle.io/pybuilder/pybuilder)
[![Open bugs](https://badge.waffle.io/pybuilder/pybuilder.png?label=bug&title=Open%20Bugs)](https://waffle.io/pybuilder/pybuilder)


PyBuilder is a software build tool written in 100% pure Python, mainly
targeting Python applications.

PyBuilder is based on the concept of dependency based programming, but it also
comes with a powerful plugin mechanism, allowing the construction of build life
cycles similar to those known from other famous (Java) build tools.

PyBuilder is running on the following versions of Python: 2.6, 2.7, 3.3, 3.4, 3.5 and PyPy.
PyBuilder is running on the following versions of Python: 2.7, 3.4, 3.5, 3.6, 3.7, PyPy 2.7, and PyPy 3.5.

See the [Travis Build](https://travis-ci.org/pybuilder/pybuilder) for version specific output.

Expand Down
16 changes: 7 additions & 9 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@
]
url = "http://pybuilder.github.io"
license = "Apache License"
version = "0.11.11.dev"
version = "0.12.0.dev"

requires_python = ">=2.6,!=3.0,!=3.1,!=3.2,<3.7"
requires_python = ">=2.7,!=3.0,!=3.1,!=3.2,!=3.3,<3.8"

default_task = ["install_dependencies", "analyze", "publish"]

Expand All @@ -91,13 +91,11 @@ def initialize(project):
project.build_depends_on("pyfix") # required test framework
project.build_depends_on("pyassert")
project.build_depends_on("pygments")
if sys.version_info[0:2] == (2, 6):
project.build_depends_on("importlib") # for fluentmock

project.depends_on("tblib")
project.depends_on("pip", ">=7.1")
project.depends_on("setuptools", "~=35.0")
project.depends_on("wheel")
project.depends_on("pip", "~=9.0")
project.depends_on("setuptools", "~=36.5")
project.depends_on("wheel", "~=0.30")

project.set_property("verbose", True)

Expand Down Expand Up @@ -142,13 +140,13 @@ def initialize(project):
'Programming Language :: Python',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
Expand Down
27 changes: 2 additions & 25 deletions src/main/python/pybuilder/pip_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,10 @@

from pip._vendor.packaging.specifiers import SpecifierSet, InvalidSpecifier
from pip._vendor.packaging.version import Version, InvalidVersion
from pip._vendor.pkg_resources import _initialize_master_working_set
from pip.commands.show import search_packages_info

try:
# This is the path for pip 7.x and beyond
from pip._vendor.pkg_resources import _initialize_master_working_set

pip_working_set_init = _initialize_master_working_set
except ImportError:
# This is the path for pip 6.x
from imp import reload
from pip._vendor import pkg_resources

def pip_working_set_init():
reload(pkg_resources)
pip_working_set_init = _initialize_master_working_set

SpecifierSet = SpecifierSet
InvalidSpecifier = InvalidSpecifier
Expand All @@ -40,19 +30,6 @@ def pip_working_set_init():
search_packages_info = search_packages_info


def _pip_disallows_insecure_packages_by_default():
import pip
# (2014-01-01) BACKWARD INCOMPATIBLE pip no longer will scrape insecure external urls by default
# nor will it install externally hosted files by default
# Also pip v1.1 for example has no __version__
return hasattr(pip, "__version__") and pip.__version__ >= '1.5'


def _pip_supports_constraints():
import pip
return hasattr(pip, "__version__") and pip.__version__ >= '7.1'


def _pip_version():
import pip
return getattr(pip, "__version__", None)
Expand Down
4 changes: 2 additions & 2 deletions src/main/python/pybuilder/pip_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ def build_pip_install_options(index_url=None, extra_index_url=None, upgrade=Fals
options.append("-t")
options.append(target_dir)

if constraint_file and pip_common._pip_supports_constraints():
if constraint_file:
options.append("-c")
options.append(constraint_file)

if pip_common._pip_disallows_insecure_packages_by_default() and insecure_installs:
if insecure_installs:
for insecure_install in insecure_installs:
arguments_for_insecure_installation = ["--allow-unverified", insecure_install,
"--allow-external", insecure_install]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

@init
def init_coverage_properties(project):
project.plugin_depends_on("coverage", "~=4.2")
project.plugin_depends_on("coverage", "~=4.4")

project.set_property_if_unset("coverage_threshold_warn", 70)
project.set_property_if_unset("coverage_branch_threshold_warn", 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def as_str(value):

@init
def initialize_distutils_plugin(project):
project.plugin_depends_on("pypandoc", "~=1.3.0")
project.plugin_depends_on("pypandoc", "~=1.4")

project.set_property_if_unset("distutils_commands", ["sdist", "bdist_wheel"])
project.set_property_if_unset("distutils_command_options", None)
Expand Down
2 changes: 1 addition & 1 deletion src/main/python/pybuilder/plugins/python/flake8_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

@init
def initialize_flake8_plugin(project):
project.plugin_depends_on("flake8", "~=3.2")
project.plugin_depends_on("flake8", "~=3.4")

project.set_property_if_unset("flake8_break_build", False)
project.set_property_if_unset("flake8_max_line_length", 120)
Expand Down
7 changes: 1 addition & 6 deletions src/main/python/pybuilder/plugins/python/unittest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,7 @@

@init
def init_test_source_directory(project):
if sys.version_info[:2] <= (2, 6):
# Support for Python 2.6 was dropped in unittest-xml-reporting
# version 2.0, so use an older version.
project.plugin_depends_on("unittest-xml-reporting<2.0")
else:
project.plugin_depends_on("unittest-xml-reporting")
project.plugin_depends_on("unittest-xml-reporting", "~=2.0")

project.set_property_if_unset("dir_source_unittest_python", "src/unittest/python")
project.set_property_if_unset("unittest_module_glob", "*_tests")
Expand Down

0 comments on commit d0f8f80

Please sign in to comment.