Skip to content

Commit

Permalink
Fix description in setup and bump version tags
Browse files Browse the repository at this point in the history
The setup script currently fails when DESCRIPTION.rst isn't present,
which happens when pip installing. Oops. This makes the behaviour
consistent with more standard approaches (specifically the approach used
by dephell when automatically creating setup.py from pyproject.toml).
  • Loading branch information
charmasaur committed Jan 14, 2021
1 parent 6e67f01 commit 4684492
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
# The short X.Y version.
version = '3.2'
# The full version, including alpha/beta/rc tags.
release = '3.2.0'
release = '3.2.1'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -152,7 +152,7 @@

# The name for this set of Sphinx documents.
# "<project> v<release> documentation" by default.
#html_title = 'M-LOOP v3.2.0'
#html_title = 'M-LOOP v3.2.1'

# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
Expand Down
2 changes: 1 addition & 1 deletion mloop/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@

import os

__version__= "3.2.0"
__version__= "3.2.1"
__all__ = ['controllers','interfaces','launchers','learners','nnlearner','testing','utilities','visualizations','cmd']
11 changes: 7 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@
from os import path

def main():
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'DESCRIPTION.rst'), encoding='utf-8') as f:
long_description = f.read()
long_description = ''
here = path.abspath(path.dirname(__file__))
description_path = path.join(here, 'DESCRIPTION.rst')
if path.exists(description_path):
with open(description_path, 'rb') as stream:
long_description = stream.read().decode('utf8')

setup(
name = 'M-LOOP',
Expand Down Expand Up @@ -46,7 +49,7 @@ def main():
license = 'MIT',
keywords = 'automated machine learning optimization optimisation science experiment quantum',
url = 'https://github.com/michaelhush/M-LOOP/',
download_url = 'https://github.com/michaelhush/M-LOOP/tarball/3.2.0',
download_url = 'https://github.com/michaelhush/M-LOOP/tarball/3.2.1',

classifiers = ['Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Science/Research',
Expand Down

0 comments on commit 4684492

Please sign in to comment.