Skip to content

Update versioneer #1547

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 3, 2025
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
13 changes: 11 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=68.0", "versioneer>=0.29", "wheel"]
requires = ["setuptools>=75.0", "versioneer[toml]==0.29", "wheel"]
build-backend = "setuptools.build_meta"

[project]
Expand All @@ -16,7 +16,7 @@ dependencies = [
'packaging>=23.1', # latest as at 7/31/23
'requests>=2.32', # latest as at 7/31/23
'urllib3>=2.2.2,<3',
'typing_extensions>=4.0.1',
'typing_extensions>=4.0',
]
requires-python = ">=3.9"
classifiers = [
Expand All @@ -38,6 +38,7 @@ test = ["black==24.8", "build", "mypy==1.4", "pytest>=7.0", "pytest-cov", "pytes
[tool.black]
line-length = 120
target-version = ['py39', 'py310', 'py311', 'py312', 'py313']
force-exclude = "tableauserverclient/bin/*"

[tool.mypy]
check_untyped_defs = false
Expand All @@ -50,7 +51,15 @@ show_error_codes = true
ignore_missing_imports = true # defusedxml library has no types
no_implicit_reexport = true
implicit_optional = true
exclude = ['/bin/']

[tool.pytest.ini_options]
testpaths = ["test"]
addopts = "--junitxml=./test.junit.xml"

[tool.versioneer]
VCS = "git"
style = "pep440-pre"
versionfile_source = "tableauserverclient/bin/_version.py"
versionfile_build = "tableauserverclient/bin/_version.py"
tag_prefix = "v"
10 changes: 0 additions & 10 deletions setup.cfg

This file was deleted.

9 changes: 0 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
import versioneer
from setuptools import setup

"""
once versioneer 0.25 gets released, we can move this from setup.cfg to pyproject.toml
[tool.versioneer]
VCS = "git"
style = "pep440-pre"
versionfile_source = "tableauserverclient/_version.py"
versionfile_build = "tableauserverclient/_version.py"
tag_prefix = "v"
"""
setup(
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
Expand Down
6 changes: 5 additions & 1 deletion tableauserverclient/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from tableauserverclient._version import get_versions
from tableauserverclient.bin._version import get_versions
from tableauserverclient.namespace import NEW_NAMESPACE as DEFAULT_NAMESPACE
from tableauserverclient.models import (
BackgroundJobItem,
Expand Down Expand Up @@ -133,3 +133,7 @@
"WeeklyInterval",
"WorkbookItem",
]

from .bin import _version

__version__ = _version.get_versions()["version"]
Loading
Loading