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 25b4881 commit 20a84c4
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 11 deletions.
6 changes: 6 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# description
include README.rst

# version
include wc_sim/VERSION

# license
include LICENSE

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

[bdist_wheel]
universal = 1

Expand Down
21 changes: 17 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,18 @@

from setuptools import setup, find_packages
from wc_utils.util.install import parse_requirements, install_dependencies
import wc_sim
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_sim/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,24 +29,26 @@
# install package
setup(
name="wc_sim",
version=wc_sim.__version__,
version=version,
description="Sequential whole-cell model simulator",
long_description=long_description,
url="https://github.com/KarrLab/wc_sim",
download_url='https://github.com/KarrLab/wc_sim/tarball/{}'.format(wc_sim.__version__),
download_url='https://github.com/KarrLab/wc_sim',
author="Arthur Goldberg",
author_email="[email protected]",
license="MIT",
keywords='whole-cell systems cell molecular biology',
packages=find_packages(exclude=['tests', 'tests.*']),
package_data={
'wc_sim': [
'VERSION',
'core/config/core.default.cfg',
'core/config/core.schema.cfg',
'core/config/debug.default.cfg',
'multialgorithm/config/core.default.cfg',
'multialgorithm/config/core.schema.cfg',
'multialgorithm/config/debug.default.cfg',
'examples/config/debug.default.cfg',
'examples/config/debug.default.cfg',
],
},
install_requires=install_requires,
Expand Down
2 changes: 1 addition & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.0.1'

1 change: 1 addition & 0 deletions wc_sim/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.1
6 changes: 5 additions & 1 deletion wc_sim/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
__version__ = '0.0.1'
import pkg_resources

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

0 comments on commit 20a84c4

Please sign in to comment.