diff --git a/.gitignore b/.gitignore index 9d8d8ba..28fb788 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,8 @@ __pycache__/ *$py.class *.py_rm_me tmp* +*.csv +*.pdf # C extensions *.so diff --git a/makefile b/makefile index 4a21aed..99daaf1 100644 --- a/makefile +++ b/makefile @@ -90,14 +90,30 @@ pylint: chmod 755 tmp_pylint tmp_pylint +# -------------------------------------------------------------------------------- +dist_archive: + #python3 -m pip install --user --upgrade setuptools wheel + python3 setup.py sdist bdist_wheel + find dist + +clean_dist: + rm -rf dist build enrichmentanalysis.egg-info + +# -------------------------------------------------------------------------------- +upload_pypi_test: + python setup.py register -r pypitest + python setup.py sdist upload -r pypitest + +# ---------------------------------------------------------------------------------------- clean: + rm -f *.csv rm -f relationship_*.txt rm -f tmp_pylint make -f makefile clean_pyc clean_pyc: find . -name \*.pyc | xargs rm -f - find . -name \*.stackdump | xargs rm -f + find . -name \*.st\*p | xargs rm -f clobber_materials: rm goa_human.*; wget http://geneontology.org/gene-associations/goa_human.gaf.gz; gunzip goa_human.gaf.gz diff --git a/setup.py b/setup.py index 3900367..f0fc5b4 100755 --- a/setup.py +++ b/setup.py @@ -1,48 +1,56 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: UTF-8 -*- """Setup for PyPI usage.""" -import os.path as op - from glob import glob from setuptools import setup -from setup_helper import SetupHelper - - -NAME = "reactomeneo4j" -CLASSIFIERS = [ - 'Development Status :: 4 - Beta', - 'Intended Audience :: Science/Research', - 'License :: OSI Approved :: BSD License', - 'Programming Language :: Python :: 3', - 'Topic :: Scientific/Engineering :: Bio-Informatics', - ] -# Use the helper -HLPR = SetupHelper(initfile="reactomeneo4j/__init__.py", readmefile="README.md") +def get_long_description(): + """Get the package's long description.""" + with open("README.md", "r") as fh: + long_description = fh.read() -SETUP_DIR = op.abspath(op.dirname(__file__)) +PACKAGES = [ + 'reactomeneo4j', + 'reactomeneo4j/code', + 'reactomeneo4j/code/cli', + 'reactomeneo4j/code/enrich', + 'reactomeneo4j/code/ex', + 'reactomeneo4j/code/mkpy', + 'reactomeneo4j/code/node', + 'reactomeneo4j/code/query', + 'reactomeneo4j/code/rest', + 'reactomeneo4j/code/run', + 'reactomeneo4j/code/schema', + 'reactomeneo4j/code/subdag', + 'reactomeneo4j/code/wrpy', + 'reactomeneo4j/data', + 'reactomeneo4j/data/all', + 'reactomeneo4j/data/hsa', + 'reactomeneo4j/data/hsa/pathways', + 'reactomeneo4j/data/pwy', + 'reactomeneo4j/work', +] setup( - name=NAME, - version=0.1, + name='reactomeneo4j', + version='0.0.1', author='DV Klopfenstein', author_email='dvklopfenstein@gmail.com', - license=HLPR.license, - long_description=('Explore peer-reviewed biological pathways ' - 'in Reactome using Python to run neo4j queries'), - packages=[ - NAME, - NAME + ".code", - NAME + ".code.node", - NAME + ".code.node.query", - NAME + ".code.schema", - NAME + ".data", - NAME + ".work"], - include_package_data=True, + long_description=get_long_description(), + packages=PACKAGES, + package_dir={p:'src/{PKG}'format(PKG=p) for p in PACKAGES}, + # include_package_data=True, # package_data={"reactomeneo4j.test_data.nbt_3102": ["*.*"]}, - scripts=glob('scripts/*.py'), - classifiers=CLASSIFIERS, + scripts=glob('src/bin/*.py'), + classifiers=[ + 'Development Status :: 4 - Beta', + 'Intended Audience :: Science/Research', + 'License :: OSI Approved :: BSD License', + 'Programming Language :: Python :: 3', + 'Topic :: Scientific/Engineering :: Bio-Informatics', + 'Operating System :: OS Independent', + ], url='http://github.com/dvklopfenstein/reactome_neo4j_py', description='Explore biological pathways in Reactome from the command-line', install_requires=['timeit', 'datetime', 'collections'], diff --git a/src/reactomeneo4j/__init__.py b/src/reactomeneo4j/__init__.py index bf2747b..095b316 100644 --- a/src/reactomeneo4j/__init__.py +++ b/src/reactomeneo4j/__init__.py @@ -1 +1,2 @@ # Python scripts for accessing biological processes in Reactome using neo4j queries. +name = 'reactomeneo4j'