Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly simplify the installation process. #13

Merged
merged 1 commit into from
Feb 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ Scaffold Maker
==============

Anatomical scaffold generator using OpenCMISS-Zinc.

For the interim, install with the following command::

pip install -r requirements.txt
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
git+https://github.com/OpenCMISS-Bindings/opencmiss.utils.git
git+https://github.com/OpenCMISS-Bindings/ZincPythonTools.git
-e git+https://github.com/OpenCMISS-Bindings/opencmiss.utils.git#egg=opencmiss.utils
-e git+https://github.com/OpenCMISS-Bindings/ZincPythonTools.git#egg=ZincPythonTools
-e .
18 changes: 5 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# List all of your Python package dependencies in the
# requirements.txt file


def readfile(filename, split=False):
with io.open(filename, encoding="utf-8") as stream:
if split:
Expand All @@ -18,19 +17,13 @@ def readfile(filename, split=False):
readme = readfile("README.rst", split=True)[3:] # skip title
# For requirements not hosted on PyPi place listings
# into the 'requirements.txt' file.
requires = [] # minimal requirements listing
requires = [
# minimal requirements listing
'opencmiss.utils',
'ZincPythonTools',
]
Copy link
Member

@alan-wu alan-wu Feb 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also use the following instead

['opencmiss.utils @ https://api.github.com/repos/OpenCMISS-Bindings/opencmiss.utils/tarball/master', 
'ZincPythonTools @  https://api.github.com/repos/OpenCMISS-Bindings/ZincPythonTools/tarball/master']

This should work for downstream users such as scaffold-web-demo.

source_license = readfile("LICENSE")


class InstallCommand(install):

def run(self):
install.run(self)
# Automatically install requirements from requirements.txt
import subprocess
subprocess.call(['pip', 'install', '-r', os.path.join(SETUP_DIR, 'requirements.txt')])


setup(name='scaffoldmaker',
version='0.1.1',
description='',
Expand All @@ -40,7 +33,6 @@ def run(self):
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
],
cmdclass={'install': InstallCommand,},
author='Richard Christie',
author_email='',
url='',
Expand Down