Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing setup import #73

Merged
merged 1 commit into from
Apr 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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