Skip to content

Commit

Permalink
Merge pull request #30 from canonical/rename-extension
Browse files Browse the repository at this point in the history
Rename extension
  • Loading branch information
ru-fu authored Dec 13, 2023
2 parents ff46b7d + 6a21a11 commit 46b3bbe
Show file tree
Hide file tree
Showing 23 changed files with 147 additions and 8 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/publish-old-name.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Publish lxd-sphinx-extensions to PyPI
on: workflow_dispatch
defaults:
run:
working-directory: ./lxd-sphinx-extensions
jobs:
build:
name: Build package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Store the package
uses: actions/upload-artifact@v3
with:
name: python-package
path: lxd-sphinx-extensions/dist/
publish:
name: Publish to TestPyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/lxd-sphinx-extensions
permissions:
id-token: write
steps:
- name: Download package
uses: actions/download-artifact@v3
with:
name: python-package
path: lxd-sphinx-extensions/dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: ./lxd-sphinx-extensions/dist/
6 changes: 4 additions & 2 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish lxd-sphinx-extensions to PyPI
name: Publish canonical-sphinx-extensions to PyPI
on: workflow_dispatch
jobs:
build:
Expand Down Expand Up @@ -27,10 +27,12 @@ jobs:
path: dist/
publish:
name: Publish to PyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/lxd-sphinx-extensions
url: https://pypi.org/p/canonical-sphinx-extensions
permissions:
id-token: write
steps:
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/publish-to-testpypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Publish canonical-sphinx-extensions to TestPyPI
on: workflow_dispatch
jobs:
build:
name: Build package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Store the package
uses: actions/upload-artifact@v3
with:
name: python-package
path: dist/
publish:
name: Publish to TestPyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/canonical-sphinx-extensions
permissions:
id-token: write
steps:
- name: Download package
uses: actions/download-artifact@v3
with:
name: python-package
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# LXD Sphinx extensions
# Canonical Sphinx extensions

This package provides several Sphinx extensions that are used in the [LXD documentation](https://linuxcontainers.org/lxd/docs/master/), but can also be useful for other documentation sets.
This package provides several Sphinx extensions that are used in Canonical documentation (for example, in the [documentation starter pack](https://github.com/canonical/sphinx-docs-starter-pack)).

**Note:** This package used to be called `lxd-sphinx-extensions` but has been renamed to `canonical-sphinx-extensions`.

## Installation

Install the package with the following command:

pip install lxd-sphinx-extensions
pip install canonical-sphinx-extensions

## Provided extensions

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions lxd-sphinx-extensions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# `lxd-sphinx-extensions` is now `canonical-sphinx-extensions`

This package has been renamed to reflect that it is being used by more projects than just LXD.
Use `pip install canonical-sphinx-extensions` instead.

New package: https://pypi.org/project/canonical-sphinx-extensions
23 changes: 23 additions & 0 deletions lxd-sphinx-extensions/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from setuptools import setup
import os

VERSION = "0.0.16"


def get_long_description():
with open(
os.path.join(os.path.dirname(os.path.abspath(__file__)), "README.md"),
encoding="utf8",
) as fp:
return fp.read()


setup(
name="lxd-sphinx-extensions",
description="lxd-sphinx-extensions is now canonical-sphinx-extensions",
long_description=get_long_description(),
long_description_content_type="text/markdown",
version=VERSION,
install_requires=["canonical-sphinx-extensions"],
classifiers=["Development Status :: 7 - Inactive"],
)
15 changes: 12 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
[metadata]
name = lxd-sphinx-extensions
version = 0.0.15
name = canonical-sphinx-extensions
version = 0.0.17
author = Ruth Fuchss
author_email = [email protected]
description = A collection of Sphinx extensions used in LXD
description = A collection of Sphinx extensions used by Canonical documentation
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/canonical/lxd-sphinx-extensions

[options]
packages =
related-links
canonical.related-links
youtube-links
canonical.youtube-links
custom-rst-roles
canonical.custom-rst-roles
config-options
canonical.config-options
terminal-output
canonical.terminal-output
filtered-toc
canonical.filtered-toc
package_dir =
canonical = canonical-sphinx-extensions
= canonical-sphinx-extensions
python_requires = >=3.6
install_requires =
sphinx
Expand Down

0 comments on commit 46b3bbe

Please sign in to comment.