Skip to content

Commit

Permalink
Merge pull request #73 from choldgraf/versions
Browse files Browse the repository at this point in the history
fixing setup import
  • Loading branch information
choldgraf authored Apr 20, 2020
2 parents f76817a + 940bc84 commit 25ac3de
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import os
from pathlib import Path

from setuptools import setup, find_packages
from sphinx_copybutton import __version__

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

if (os.path.isdir('clipboard.js') and
not os.path.islink('sphinx_copybutton/_static/clipboard.min.js')):
Expand All @@ -20,7 +26,7 @@

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',
Expand Down

0 comments on commit 25ac3de

Please sign in to comment.