Skip to content

Commit

Permalink
sphinx copybutton info
Browse files Browse the repository at this point in the history
  • Loading branch information
choldgraf committed Apr 21, 2020
1 parent f76817a commit eac11cc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
6 changes: 3 additions & 3 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ To create a new release of Sphinx-Copybutton, you need to do these things:

## To create the release

To create a new release, [open an issue](https://github.com/choldgraf/sphinx-copybutton/issues/new) to keep
To create a new release, [open an issue](https://github.com/ExecutableBookProject/sphinx-copybutton/issues/new) to keep
track of the to-do list for the release. Copy/paste the following markdown into the issue
and check off the boxes as you complete items:


```
- [ ] Ensure that the [Sphinx-Copybutton version number](https://github.com/choldgraf/sphinx-copybutton/blob/master/jupyter_book/__init__.py)
- [ ] Ensure that the [Sphinx-Copybutton version number](https://github.com/ExecutableBookProject/sphinx-copybutton/blob/master/jupyter_book/__init__.py)
is correct, and remove the `dev0` part of the version number.
Make a PR with the new number and merge into master.
- [ ] Create a new distribution for Sphinx-Copybutton by
[following the twine release instructions](https://twine.readthedocs.io/en/latest/#using-twine)
- [ ] Confirm that the new version of Sphinx-Copybutton [is posted to pypi](https://pypi.org/project/sphinx-copybutton/)
- [ ] Bump the [Sphinx-Copybutton version number](https://github.com/choldgraf/sphinx-copybutton/blob/master/jupyter_book/__init__.py) to
- [ ] Bump the [Sphinx-Copybutton version number](https://github.com/ExecutableBookProject/sphinx-copybutton/blob/master/jupyter_book/__init__.py) to
the next minor (or major) release and append `dev0` to the end.
- [ ] Celebrate! You've just released a new version of Sphinx-Copybutton!
```
6 changes: 3 additions & 3 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ You can install ``sphinx-copybutton`` with ``pip``:
pip install sphinx-copybutton
`Here's a link to the sphinx-copybutton GitHub repository <https://github.com/choldgraf/sphinx-copybutton>`_.
`Here's a link to the sphinx-copybutton GitHub repository <https://github.com/ExecutableBookProject/sphinx-copybutton>`_.

Usage
=====
Expand Down Expand Up @@ -92,7 +92,7 @@ Customize the CSS

To customize the display of the copy button, you can add your own CSS files
that overwrite the CSS in the
`sphinx-copybutton CSS rules <https://github.com/choldgraf/sphinx-copybutton/blob/master/_static/copybutton.css>`_.
`sphinx-copybutton CSS rules <https://github.com/ExecutableBookProject/sphinx-copybutton/blob/master/_static/copybutton.css>`_.
Just add these files to ``_static`` in your documentation folder, and it should
overwrite sphinx-copybutton's behavior.

Expand Down Expand Up @@ -198,7 +198,7 @@ Development
If you'd like to develop or make contributions for sphinx-copybutton, fork
the repository here:
https://github.com/choldgraf/sphinx-copybutton
https://github.com/ExecutableBookProject/sphinx-copybutton
pull to your computer and install locally with ``pip``::
Expand Down
17 changes: 11 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os

from pathlib import Path
from setuptools import setup, find_packages
from sphinx_copybutton import __version__

if (os.path.isdir('clipboard.js') and
not os.path.islink('sphinx_copybutton/_static/clipboard.min.js')):
Expand All @@ -18,15 +17,21 @@
with open('./README.md', 'r') as ff:
readme_text = ff.read()

# Parse version
init = Path(__file__).parent.joinpath("sphinx_copybutton", "__init__.py")
for line in init.read_text().split("\n"):
if line.startswith("__version__ ="):
break
version = line.split(" = ")[-1].strip('"')

setup(
name='sphinx-copybutton',
version=__version__,
version=version,
description="Add a copy button to each of your code cells.",
long_description=readme_text,
long_description_content_type='text/markdown',
author='Chris Holdgraf',
author_email='choldgraf@berkeley.edu',
url="https://github.com/choldgraf/sphinx-copybutton",
author='Executable Book Project',
url="https://github.com/ExecutableBookProject/sphinx-copybutton",
license='MIT License',
packages=find_packages(),
package_data={'sphinx_copybutton': ['_static/copybutton.css',
Expand Down

0 comments on commit eac11cc

Please sign in to comment.