Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[build-system]
requires = ["setuptools >=42", "setuptools_scm[toml] >=3.4.1", "wheel"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
write_to = "pytest_localserver/_version.py"
2 changes: 1 addition & 1 deletion pytest_localserver/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = '0.5.1.post0'
from pytest_localserver._version import version as VERSION
Comment thread
diazona marked this conversation as resolved.
9 changes: 0 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,12 @@
import sys


VERSION = '0.5.1.post0'


def read(fname):
# makes sure that setup can be executed from a different location
import os.path
_here = os.path.abspath(os.path.dirname(__file__))
return open(os.path.join(_here, fname)).read()

# make sure that versions match before uploading anything to the cheeseshop
if 'upload' in sys.argv or 'register' in sys.argv:
import pytest_localserver
assert pytest_localserver.VERSION == VERSION


class PyTest(Command):
user_options = []
Expand All @@ -30,7 +22,6 @@ def run(self):

setup(
name='pytest-localserver',
version=VERSION,
Comment thread
diazona marked this conversation as resolved.
author='Sebastian Rahlf',
author_email='basti@redtoad.de',
maintainer='David Zaslavsky',
Expand Down
6 changes: 6 additions & 0 deletions tests/test_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import pytest_localserver


def test_version():
assert hasattr(pytest_localserver, "VERSION")
assert isinstance(pytest_localserver.VERSION, str)
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[tox]
envlist = py35,py36,py37,py38,py39,py310
recreate = True
isolated_build = True

[tox:hudson]
downloadcache = {toxworkdir}/_download
Expand Down