Skip to content

Commit a6dc84b

Browse files
authored
Merge pull request #519 from common-workflow-language/update_readme
readme: Add more verbose instructions to install from source
2 parents b06e5ac + 78b686b commit a6dc84b

File tree

1 file changed

+26
-12
lines changed

1 file changed

+26
-12
lines changed

README.rst

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,34 @@ default CWL interpreter installed on a host.
2626
Install
2727
-------
2828

29-
Installing the official package from PyPi (will install "cwltool" package as
30-
well)::
29+
It is highly recommended to setup virtual environment before installing `cwltool`:
30+
31+
.. code:: bash
32+
33+
virtualenv -p python2 venv # Create a virtual environment, can use `python3` as well
34+
source venv/bin/activate # Activate environment before installing `cwltool`
35+
36+
1. Installing the official package from PyPi (will install "cwltool" package as
37+
well)
38+
39+
.. code:: bash
3140
3241
pip install cwlref-runner
3342
34-
If installing alongside another CWL implementation then::
43+
If installing alongside another CWL implementation then
44+
45+
.. code:: bash
3546
3647
pip install cwltool
3748
38-
To install from source::
49+
2. To install from source
50+
51+
.. code:: bash
3952
40-
git clone https://github.com/common-workflow-language/cwltool.git
41-
cd cwltool && python setup.py install
42-
cd cwlref-runner && python setup.py install # co-installing? skip this
53+
git clone https://github.com/common-workflow-language/cwltool.git # clone cwltool repo
54+
cd cwltool # Switch to source directory
55+
pip install . # Install `cwltool` from source
56+
cwltool --version # Check if the installation works correctly
4357
4458
Remember, if co-installing multiple CWL implementations then you need to
4559
maintain which implementation ``cwl-runner`` points to via a symbolic file
@@ -191,7 +205,7 @@ available for each are documented (incompletely) `here
191205
Unfortunately, this documentation is in the context of Galaxy tool ``requirement`` s instead of CWL ``SoftwareRequirement`` s, but the concepts map fairly directly.
192206

193207
cwltool is distributed with an example of such seqtk tool and sample corresponding
194-
job. It could executed from the cwltool root using a dependency resolvers
208+
job. It could executed from the cwltool root using a dependency resolvers
195209
configuration file such as the above one using the command::
196210

197211
cwltool --beta-dependency-resolvers-configuration /path/to/dependency-resolvers-conf.yml \
@@ -208,8 +222,8 @@ the same concepts - the resolver plugin type ``galaxy_packages`` can be used.
208222
"Galaxy packages" are a lighter weight alternative to Environment Modules that are
209223
really just defined by a way to lay out directories into packages and versions
210224
to find little scripts that are sourced to modify the environment. They have
211-
been used for years in Galaxy community to adapt Galaxy tools to cluster
212-
environments but require neither knowledge of Galaxy nor any special tools to
225+
been used for years in Galaxy community to adapt Galaxy tools to cluster
226+
environments but require neither knowledge of Galaxy nor any special tools to
213227
setup. These should work just fine for CWL tools.
214228

215229
The cwltool source code repository's test directory is setup with a very simple
@@ -238,7 +252,7 @@ Then cwltool will simply find that ``env.sh`` file and source it before executin
238252
the corresponding tool. That ``env.sh`` script is only responsible for modifying
239253
the job's ``PATH`` to add the required binaries.
240254

241-
This is a full example that works since resolving "Galaxy packages" has no
255+
This is a full example that works since resolving "Galaxy packages" has no
242256
external requirements. Try it out by executing the following command from cwltool's
243257
root directory::
244258

@@ -302,7 +316,7 @@ user, install its own Conda environment and manage multiple versions of Conda pa
302316
on both Linux and Mac OS X.
303317

304318
The Conda plugin can be endlessly configured, but a sensible set of defaults
305-
that has proven a powerful stack for dependency management within the Galaxy tool
319+
that has proven a powerful stack for dependency management within the Galaxy tool
306320
development ecosystem can be enabled by simply passing cwltool the
307321
``--beta-conda-dependencies`` flag.
308322

0 commit comments

Comments
 (0)