Skip to content

Commit

Permalink
cleaning up packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrkarr committed Dec 2, 2017
1 parent e5bc327 commit 473b37e
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 8 deletions.
6 changes: 6 additions & 0 deletions MANIFEST.in
@@ -1,3 +1,9 @@
# description
include README.rst

# version
include wc_lang/VERSION

# license
include LICENSE

Expand Down
2 changes: 1 addition & 1 deletion README.md
@@ -1,4 +1,4 @@
<!-- [![PyPI package](https://img.shields.io/pypi/v/wc_lang.svg)](https://pypi.python.org/pypi/wc_lang) -->
[//]: # ( [![PyPI package](https://img.shields.io/pypi/v/wc_lang.svg)](https://pypi.python.org/pypi/wc_lang) )
[![Documentation](https://img.shields.io/badge/docs-latest-brightgreen.svg)](http://code.karrlab.org)
[![Test results](https://circleci.com/gh/KarrLab/wc_lang.svg?style=shield&circle-token=f0edfe4f971e8871ebb097bdc7b10a270cd90a96)](https://circleci.com/gh/KarrLab/wc_lang)
[![Test coverage](https://coveralls.io/repos/github/KarrLab/wc_lang/badge.svg?t=xViD7w)](https://coveralls.io/github/KarrLab/wc_lang)
Expand Down
3 changes: 0 additions & 3 deletions setup.cfg
@@ -1,6 +1,3 @@
[metadata]
description-file = README.rst

[bdist_wheel]
universal = 1

Expand Down
19 changes: 16 additions & 3 deletions setup.py
Expand Up @@ -3,7 +3,18 @@

from setuptools import setup, find_packages
from wc_utils.util.install import parse_requirements, install_dependencies
import wc_lang
import os

# get long description
if os.path.isfile('README.rst'):
with open('README.rst', 'r') as file:
long_description = file.read()
else:
long_description = ''

# get version
with open('wc_lang/VERSION', 'r') as file:
version = file.read().strip()

# parse dependencies and links from requirements.txt files
with open('requirements.txt', 'r') as file:
Expand All @@ -18,17 +29,19 @@
# install package
setup(
name="wc_lang",
version=wc_lang.__version__,
version=version,
description="Language for describing whole-cell models",
long_description=long_description,
url="https://github.com/KarrLab/wc_lang",
download_url='https://github.com/KarrLab/wc_lang/tarball/{}'.format(wc_lang.__version__),
download_url='https://github.com/KarrLab/wc_lang',
author="Jonathan Karr",
author_email="jonrkarr@gmail.com",
license="MIT",
keywords='whole-cell systems biology',
packages=find_packages(exclude=['tests', 'tests.*']),
package_data={
'wc_lang': [
'VERSION',
],
},
install_requires=install_requires,
Expand Down
1 change: 1 addition & 0 deletions wc_lang/VERSION
@@ -0,0 +1 @@
0.0.1
6 changes: 5 additions & 1 deletion wc_lang/__init__.py
@@ -1 +1,5 @@
__version__ = '0.0.1'
import pkg_resources

with open(pkg_resources.resource_filename('wc_lang', 'VERSION'), 'r') as file:
__version__ = file.read().strip()
# :obj:`str`: version

0 comments on commit 473b37e

Please sign in to comment.