Skip to content

Commit

Permalink
fixing setup import
Browse files Browse the repository at this point in the history
  • Loading branch information
choldgraf committed Apr 20, 2020
1 parent f76817a commit 940bc84
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 940bc84

Please sign in to comment.