-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
👷(circleci) publish python package on every merge on master
We use setuptools_scm to automatically generate the release version of richie. When the current commit is a tag, the version tag will be used. Otherwise it guess the next version number with unique info like the current commit hash. The CI is refactor to take advantage of this feature.
- Loading branch information
Showing
5 changed files
with
71 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,12 @@ | |
# Richie package | ||
# | ||
[build-system] | ||
requires = ["setuptools"] | ||
requires = ["setuptools>=60", "setuptools-scm>=8.0"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "richie" | ||
version = "2.25.0-beta.1" | ||
dynamic = ["version"] | ||
description = "A CMS to build learning portals for open education" | ||
readme = "README.md" | ||
authors = [{ "name" = "Open FUN (France Université Numérique)", "email" = "[email protected]" }] | ||
|
@@ -42,6 +42,7 @@ dependencies = [ | |
"easy_thumbnails[svg]>=2.8", | ||
"elasticsearch>=6.0.0,<7.0.0", | ||
"exrex==0.11.0", | ||
"importlib-metadata", | ||
"oauthlib==3.2.2", | ||
"requests==2.31.0", | ||
] | ||
|
@@ -130,3 +131,5 @@ testpaths = [ | |
filterwarnings = [ | ||
"ignore:::(?!(tests|richie))", | ||
] | ||
|
||
[tool.setuptools_scm] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,7 @@ | ||
""" | ||
Richie: a FUN portal for Open edX | ||
""" | ||
from __future__ import absolute_import, unicode_literals | ||
from importlib_metadata import version | ||
|
||
import os | ||
|
||
import pkg_resources | ||
from setuptools.config import read_configuration | ||
|
||
PROJECT_DIR = os.path.join(os.path.dirname(__file__), "../..") | ||
|
||
|
||
def _extract_version(package_name): | ||
""" | ||
Get package version from installed distribution or configuration file if not | ||
installed | ||
""" | ||
try: | ||
return pkg_resources.get_distribution(package_name).version | ||
except pkg_resources.DistributionNotFound: | ||
_conf = read_configuration(os.path.join(PROJECT_DIR, "pyproject.toml")) | ||
return _conf["project"]["version"] | ||
|
||
|
||
__version__ = _extract_version("richie") | ||
__version__ = version("richie") |