Skip to content

Commit

Permalink
Get version from scm (#466)
Browse files Browse the repository at this point in the history
  • Loading branch information
wlach authored Apr 14, 2020
1 parent 5e938d0 commit 1ab04a5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
4 changes: 3 additions & 1 deletion mozregression/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
__version__ = "3.0.4"
from .version import version

__version__ = version
9 changes: 8 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# pyproject.toml
[build-system]
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4"]

[tool.setuptools_scm]
write_to = "mozregression/version.py"

[tool.black]
line-length = 100
exclude = "gui/mozregui/ui"
# excludes handled in setup.cfg, since it's called via flake8

[tool.isort]
line_length = 100
Expand Down
1 change: 1 addition & 0 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ mozrunner==7.8.0
mozversion==2.3.0
redo==2.0.3
requests==2.23.0
setuptools_scm==3.5.0
taskcluster==29.0.1

# for some reason we need to specify a specific version of six
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[flake8]
exclude = .git,__pycache__,vendor,gui/mozregui/ui
exclude = .git,__pycache__,vendor,gui/mozregui/ui,mozregression/version.py
max-line-length = 100
# E121,E123,E126,E226,E24,E704,W503: Ignored in default pycodestyle config:
# https://github.com/PyCQA/pycodestyle/blob/2.2.0/pycodestyle.py#L72
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from setuptools import setup

from mozregression import __version__

# we pin these dependencies in the requirements files -- all of these
# should be python 3 compatible
DEPENDENCIES = [
Expand Down Expand Up @@ -31,7 +29,7 @@

setup(
name="mozregression",
version=__version__,
use_scm_version=True,
description=desc,
long_description=long_desc,
author="Mozilla Automation and Tools Team",
Expand All @@ -46,6 +44,7 @@
package_data={"mozregression": ["*.yaml"]},
platforms=["Any"],
python_requires=">=3.5",
setup_requires=["setuptools_scm"],
install_requires=DEPENDENCIES,
classifiers=[
"Development Status :: 5 - Production/Stable",
Expand Down

0 comments on commit 1ab04a5

Please sign in to comment.