Skip to content

Commit

Permalink
add package setup
Browse files Browse the repository at this point in the history
  • Loading branch information
PingjunChen committed Dec 14, 2018
1 parent 681784a commit 2fb0e45
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,7 +1,7 @@
data/

*.pyc

data/
.venv
__pycache__/
.pytest_cache/
1 change: 1 addition & 0 deletions MANIFEST.in
@@ -0,0 +1 @@
include requirements.txt LICENSE
5 changes: 5 additions & 0 deletions setup.cfg
@@ -0,0 +1,5 @@
[metadata]
description-file = README.md

[bdist_wheel]
universal=1
45 changes: 45 additions & 0 deletions setup.py
@@ -0,0 +1,45 @@
# -*- coding: utf-8 -*-

import os, sys
from setuptools import setup, find_packages


PKG_NAME = "TissueLocalizer"
VERSION = 1.0.0
DESCRIPTION = "Localize the tissue regions in whole slide pathology images."
HOMEPAGE = "https://github.com/PingjunChen/TissueLocalizer"
LICENSE = "MIT"
AUTHOR_NAME = "Pingjun Chen"
AUTHOR_EMAIL = "chenpingjun@gmx.com"

REQS = ""
with open('requirements.txt') as f:
REQS = [pkg.replace("==", ">=") for pkg in f.read().splitlines()]

CLASSIFIERS = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Topic :: Scientific/Engineering',
'Topic :: Computational Pathology',
'Topic :: Whole Slide Image Analysis',
]

args = dict(
name=PKG_NAME,
version=VERSION,
description=DESCRIPTION,
url=HOMEPAGE,
license=LICENSE,
author=AUTHOR_NAME,
author_email=AUTHOR_EMAIL,
packages=find_packages(),
install_requires=REQS,
classifiers=CLASSIFIERS,
)

setup(**args)
6 changes: 6 additions & 0 deletions src/__init__.py
@@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-

import os, sys

from load_slide import *
from locate_tissue import *
19 changes: 19 additions & 0 deletions src/setup.py
@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-

import os, sys

BASE_PATH = os.path.abspath(os.path.dirname(__file__))
PKG_NAME = os.path.basename(BASE_PATH)

def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration(PKG_NAME, parent_package, top_path)

return config


if __name__ == "__main__":
from numpy.distutils.core import setup

config = configuration(top_path='').todict()
setup(**config)

0 comments on commit 2fb0e45

Please sign in to comment.