Skip to content

Commit

Permalink
Update setup.py and conda recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanwweber committed Sep 21, 2018
1 parent 57d1825 commit 0eb73b7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
7 changes: 4 additions & 3 deletions conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ source:

build:
number: 0
script: python setup.py install --single-version-externally-managed --record=record.txt
script: "{{ PYTHON }} -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv"
noarch: python

requirements:
build:
- python >=3.5
host:
- python
- pip
- setuptools

run:
Expand Down
22 changes: 9 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,17 @@

here = op.abspath(op.dirname(__file__))

with open(op.join(here, 'thermostate', '_version.py')) as version_file:
exec(version_file.read())
version = {}
with open(op.join(here, 'thermostate', '_version.py'), mode='r') as version_file:
exec(version_file.read(), version)

with open(op.join(here, 'README.md')) as readme_file:
with open(op.join(here, 'README.md'), mode='r') as readme_file:
readme = readme_file.read()

with open(op.join(here, 'CHANGELOG.md')) as changelog_file:
with open(op.join(here, 'CHANGELOG.md'), mode='r') as changelog_file:
changelog = changelog_file.read()

desc = readme + '\n\n' + changelog
try:
import pypandoc
long_description = pypandoc.convert_text(desc, 'rst', format='md')
with open(op.join(here, 'README.rst'), 'w') as rst_readme:
rst_readme.write(long_description)
except (ImportError, OSError, IOError):
long_description = desc
long_description = readme + '\n\n' + changelog

install_requires = [
'coolprop>=6.1.0,<6.2',
Expand All @@ -37,9 +31,10 @@

setup(
name='thermostate',
version=__version__,
version=version['__version__'],
description='A package to manage thermodynamic states',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/bryanwweber/thermostate',
author='Bryan W. Weber',
author_email='[email protected]',
Expand All @@ -50,6 +45,7 @@
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Operating System :: MacOS',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft',
Expand Down

0 comments on commit 0eb73b7

Please sign in to comment.