From d0ccbb8e1c512811af0ec7670056a677e3e856dc Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Thu, 8 Aug 2019 11:17:23 +0200 Subject: [PATCH] fix loading pkg while setup (#71) * fix loading package while setup #56 * Update setup.py * Update __init__.py * Update setup.py * use complete req. * Update setup.py * Update setup.py --- pytorch_lightning/__init__.py | 10 ------- setup.py | 51 ++++++++++++++++++----------------- 2 files changed, 26 insertions(+), 35 deletions(-) diff --git a/pytorch_lightning/__init__.py b/pytorch_lightning/__init__.py index 73067d63..a1cd0769 100644 --- a/pytorch_lightning/__init__.py +++ b/pytorch_lightning/__init__.py @@ -2,16 +2,6 @@ from .models.trainer import Trainer from .root_module.root_module import LightningModule from .root_module.decorators import data_loader -__version__ = '0.3.6.9' -__author__ = "William Falcon", -__author_email__ = "waf2107@columbia.edu" -__license__ = 'Apache-2' -__homepage__ = 'https://github.com/williamFalcon/pytorch-lightning', -__copyright__ = 'Copyright (c) 2018-2019, %s.' % __author__ -__doc__ = """ -The Keras for ML researchers using PyTorch -""" - __all__ = [ 'Trainer', 'LightningModule', diff --git a/setup.py b/setup.py index 64938fcb..ec29d6d6 100755 --- a/setup.py +++ b/setup.py @@ -1,38 +1,39 @@ #!/usr/bin/env python # Always prefer setuptools over distutils -from os import path -from setuptools import setup - -import pytorch_lightning - -PATH_HERE = path.abspath(path.dirname(__file__)) - -with open(path.join(PATH_HERE, 'requirements.txt'), encoding='utf-8') as fp: - requirements = [rq.rstrip() for rq in fp.readlines() if not rq.startswith('#')] +from setuptools import setup, find_packages # https://packaging.python.org/guides/single-sourcing-package-version/ + # http://blog.ionelmc.ro/2014/05/25/python-packaging/ + +# https://packaging.python.org/discussions/install-requires-vs-requirements/ +# keep the meta-data here for simplicity in reading this file... it's not obvious +# what happens and to non-engineers they won't know to look in init... +# the goal of the project is simplicity for researchers, don't want to add too much +# engineer specific practices setup( - name="pytorch-lightning", - version=pytorch_lightning.__version__, - description=pytorch_lightning.__doc__, - author=pytorch_lightning.__author__, - author_email=pytorch_lightning.__author_email__, - url=pytorch_lightning.__homepage__, - license=pytorch_lightning.__license__, - packages=['pytorch_lightning'], - - long_description=open("README.md", encoding="utf-8").read(), + name='pytorch-lightning', + version='0.3.6.9', + description='The Keras for ML researchers using PyTorch', + author='William Falcon', + author_email='waf2107@columbia.edu', + url='https://github.com/williamFalcon/pytorch-lightning', + download_url='https://github.com/williamFalcon/pytorch-lightning', + license='Apache-2', + packages=find_packages(), + long_description=open('README.md', encoding='utf-8').read(), long_description_content_type='text/markdown', - include_package_data=True, zip_safe=False, - - keywords=["deep learning", "pytorch", "AI"], - python_requires=">=3.6", - install_requires=requirements, - + keywords=['deep learning', 'pytorch', 'AI'], + python_requires='>=3.6', + install_requires=[ + 'torch>=1.1.0', + 'tqdm', + 'test-tube>=0.6.7.6', + 'pandas>=0.20.3', + ], classifiers=[ 'Environment :: Console', 'Natural Language :: English',