Skip to content

Commit

Permalink
remove setuptools_scm in favor of manual version management
Browse files Browse the repository at this point in the history
The version file was not checked in, causing Travis builds to fail.
There is a way to fix this without reverting to manual versions,
but it's more trouble than it's worth.
  • Loading branch information
wolverdude committed Apr 19, 2021
1 parent 4bbf495 commit 7f416e6
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 10 deletions.
4 changes: 0 additions & 4 deletions .gitignore
@@ -1,7 +1,3 @@
# generated file

/genson/version.py

# See: github.com/github/gitignore/blob/master/Python.gitignore

# Byte-compiled / optimized / DLL files
Expand Down
2 changes: 1 addition & 1 deletion genson/__init__.py
@@ -1,8 +1,8 @@
from .schema.builder import SchemaBuilder, Schema
from .schema.node import SchemaNode, SchemaGenerationError
from .schema.strategies.base import SchemaStrategy, TypedSchemaStrategy
from .version import __version__

__version__ = '1.3.0'
__all__ = [
'SchemaBuilder',
'SchemaNode',
Expand Down
6 changes: 1 addition & 5 deletions pyproject.toml
@@ -1,7 +1,3 @@
[build-system]
requires = ["setuptools>=44", "wheel", "setuptools_scm[toml]>=3.4.3"]
requires = ["setuptools>=44", "wheel"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
write_to = "genson/version.py"
write_to_template = "__version__ = '{version}'\n"
1 change: 1 addition & 0 deletions setup.cfg
@@ -1,5 +1,6 @@
[metadata]
name = genson
version = 1.3.0

This comment has been minimized.

Copy link
@aviv-julienjehannet

aviv-julienjehannet Apr 19, 2021

I suppose you could use this form to avoid duplication:

-version = 1.3.0
+version = attr:genson.__version__

See https://packaging.python.org/guides/single-sourcing-package-version/#single-sourcing-the-package-version

This comment has been minimized.

Copy link
@wolverdude

wolverdude Apr 20, 2021

Author Owner

That's a fair point. I came across that in my research but forgot about it. I might as well make that change.

author = Jon Wolverton
author_email = wolverton.jr@gmail.com
license = MIT
Expand Down

0 comments on commit 7f416e6

Please sign in to comment.