Skip to content

Commit

Permalink
Reworked integration part
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Wilhelm authored and Florian Wilhelm committed Jul 7, 2015
1 parent 3547209 commit ab93073
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 35 deletions.
15 changes: 1 addition & 14 deletions pyscaffold/integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@
import os
from distutils.cmd import Command

# The following import is needed due to the internal workings of setuptools
from setuptools_scm.integration import find_files # noqa
from setuptools_scm.version import _warn_if_setuptools_outdated
from setuptools_scm import get_version
from setuptools_scm.utils import trace
from setuptools_scm.version import _warn_if_setuptools_outdated
from pbr.core import pbr as read_setup_cfg

__author__ = "Florian Wilhelm"
Expand Down Expand Up @@ -118,14 +116,3 @@ def pyscaffold_keyword(dist, keyword, value):
# Adding doctest again since PBR seems to drop these
dist.cmdclass['doctest'] = build_cmd_docs()
dist.command_options['doctest'] = {'builder': ('setup.py', 'doctest')}


def setup_hook(config):
"""
Hook that sets the version of PyScaffold during the bootstrapping
:param config: setup arguments as dictionary
"""
version = get_version(version_scheme=version2str,
local_scheme=local_version2str)
os.environ['PBR_VERSION'] = version if version else 'unknown'
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,7 @@ def setup_package():
entry_points={
'console_scripts': ['putup=pyscaffold.cli:run'],
'distutils.setup_keywords':
['use_pyscaffold = pyscaffold.integration:pyscaffold_keyword'],
'setuptools.file_finders':
['setuptools_scm=pyscaffold.integration:find_files']
['use_pyscaffold=pyscaffold.integration:pyscaffold_keyword']
}
setup(name='pyscaffold',
url='http://pyscaffold.readthedocs.org/',
Expand Down
File renamed without changes.
2 changes: 0 additions & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
import pytest
from pyscaffold import cli

from fixtures import git_mock, noconfgit_mock, nogit_mock, tmpdir # noqa

__author__ = "Florian Wilhelm"
__copyright__ = "Blue Yonder"
__license__ = "new BSD"
Expand Down
2 changes: 0 additions & 2 deletions tests/test_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
from pyscaffold import info, cli
from six import string_types

from fixtures import git_mock, noconfgit_mock, nogit_mock, tmpdir # noqa

__author__ = "Florian Wilhelm"
__copyright__ = "Blue Yonder"
__license__ = "new BSD"
Expand Down
2 changes: 0 additions & 2 deletions tests/test_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
from pyscaffold.shell import git
from pyscaffold.utils import chdir

from fixtures import tmpdir # noqa

__author__ = "Florian Wilhelm"
__copyright__ = "Blue Yonder"
__license__ = "new BSD"
Expand Down
5 changes: 0 additions & 5 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,3 @@ def test_deactivate_pbr_authors_changelog():
# This is commented only due to a bug in PBR,
# see https://bugs.launchpad.net/pbr/+bug/1467440
# assert os.environ['SKIP_WRITE_GIT_CHANGELOG'] == "1"


def test_setup_hook():
integration.setup_hook('dummy')
assert 'PBR_VERSION' in os.environ
2 changes: 0 additions & 2 deletions tests/test_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import pytest
from pyscaffold import repo, structure

from fixtures import tmpdir # noqa

__author__ = "Florian Wilhelm"
__copyright__ = "Blue Yonder"
__license__ = "new BSD"
Expand Down
2 changes: 0 additions & 2 deletions tests/test_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import six
from pyscaffold import cli, structure, utils

from fixtures import nodjango_admin_mock, tmpdir # noqa

__author__ = "Florian Wilhelm"
__copyright__ = "Blue Yonder"
__license__ = "new BSD"
Expand Down
3 changes: 0 additions & 3 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
from pyscaffold import utils, templates
from pyscaffold.structure import create_structure

from fixtures import tmpdir # noqa


def test_chdir():
curr_dir = os.getcwd()
try:
Expand Down

0 comments on commit ab93073

Please sign in to comment.