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 fc9ef77 commit cf214ae
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 9 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_rules/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_rules.svg)](https://pypi.python.org/pypi/wc_rules) -->
[//]: # ( [![PyPI package](https://img.shields.io/pypi/v/wc_rules.svg)](https://pypi.python.org/pypi/wc_rules) )
[![Documentation](https://readthedocs.org/projects/wc_rules/badge/?version=latest)](http://wc_rules.readthedocs.org)
[![Test results](https://circleci.com/gh/KarrLab/wc_rules.svg?style=shield)](https://circleci.com/gh/KarrLab/wc_rules)
[![Test coverage](https://coveralls.io/repos/github/KarrLab/wc_rules/badge.svg)](https://coveralls.io/github/KarrLab/wc_rules)
Expand Down
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
24 changes: 20 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_rules
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_rules/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,16 +29,21 @@
# install package
setup(
name="wc_rules",
version=wc_rules.__version__,
version=version,
description="Language for describing whole-cell models",
long_description=long_description,
url="https://github.com/KarrLab/wc_rules",
download_url='https://github.com/KarrLab/wc_rules/tarball/{}'.format(wc_rules.__version__),
download_url='https://github.com/KarrLab/wc_rules',
author="John Sekar",
author_email="johnarul.sekar@gmail.com",
license="MIT",
keywords='whole-cell systems biology',
packages=find_packages(exclude=['tests', 'tests.*']),
package_data={},
package_data={
'wc_rules': [
'VERSION',
],
},
install_requires=install_requires,
tests_require=tests_require,
dependency_links=dependency_links,
Expand Down
1 change: 1 addition & 0 deletions wc_rules/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.1
6 changes: 5 additions & 1 deletion wc_rules/__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_rules', 'VERSION'), 'r') as file:
__version__ = file.read().strip()
# :obj:`str`: version

0 comments on commit cf214ae

Please sign in to comment.