Skip to content

Commit

Permalink
Use setuptools_scm (#71)
Browse files Browse the repository at this point in the history
* Migrate to setuptools_scm

* Fix package directory

* Get version from importlib

* Ignore _version.py
  • Loading branch information
rob-tay authored Aug 4, 2021
1 parent 6c5f1e6 commit cd8754d
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 21 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ pip-wheel-metadata/
build/
dist/
*.swp
src/_version.py

docs/_build/
docs/savefig
Expand Down
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

import os
import sys
from importlib.metadata import version

sys.path.insert(0, os.path.abspath("../src/fairlens"))

Expand All @@ -35,7 +36,7 @@
author = "Synthesized Ltd."

# The full version, including alpha/beta/rc tags
release = "0.0.1"
release = version("fairlens")


# -- General configuration ---------------------------------------------------
Expand Down
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
[build-system]
requires = [
"setuptools>=42",
"wheel"
"setuptools>=45",
"wheel",
"setuptools_scm[toml]>=6.0"
]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
write_to = "src/_version.py"

[tool.black]
line-length = 120
5 changes: 4 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[metadata]
name = fairlens
version = 0.0.1
author = Synthesized Ltd.
author_email = [email protected]
description = Identify bias and measure fairness of your data
Expand Down Expand Up @@ -34,6 +33,10 @@ install_requires =
[options.packages.find]
where = src

[options.package_data]
fairlens =
sensitive/configs/*.json

[options.extras_require]
dev =
pytest>=4.6
Expand Down
16 changes: 0 additions & 16 deletions setup.py

This file was deleted.

1 change: 0 additions & 1 deletion src/fairlens/version.py

This file was deleted.

0 comments on commit cd8754d

Please sign in to comment.