summaryrefslogtreecommitdiff
path: root/source/contributing.rst
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2016-04-11 11:11:51 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2016-04-11 11:11:51 -0400
commit68e0367b1d0c89de6a8917a2cac57b20e1dfac33 (patch)
tree970fb48776458b901f28e365ba7719ae734fbf52 /source/contributing.rst
parent8f12d9e7948f6f89e1549ff981fb9b355c210909 (diff)
downloadastroconda-68e0367b1d0c89de6a8917a2cac57b20e1dfac33.tar.gz
Initial attempt (unfinished) of contributing guide
Diffstat (limited to 'source/contributing.rst')
-rw-r--r--source/contributing.rst95
1 files changed, 95 insertions, 0 deletions
diff --git a/source/contributing.rst b/source/contributing.rst
index fcdfce1..3af5b60 100644
--- a/source/contributing.rst
+++ b/source/contributing.rst
@@ -54,5 +54,100 @@ create a directory and name it ``sympy``, and proceed inside:
**Hint:** Investigate the contents of the recipes in astroconda-contrib. For most cases, copying an existing recipe and
changing its values will suffice.
+Copy the contents of the ``astroconda-contrib/template`` recipe. Three files ``bld.bat``, ``build.sh``, and ``meta.yaml``
+will be copied to your working directory:
+.. code-block:: sh
+
+ cp ../template/* .
+
+
+Go ahead and open ``meta.yaml`` with your favorite plain-text editor:
+
+.. caution::
+
+ It is *highly recommended* that you enable "tabs to spaces" for your editor. Tab widths are unpredictable and may cause
+ Conda's YAML parser to fail.
+
+.. code-block:: sh
+
+ vim meta.yaml
+
+The general structure of the file is as follows:
+
+.. code-block:: yaml
+
+ # These directives are commented here due to Pygments
+ # failing to parse this section of code.
+ # ... They are not commented in the real file.
+
+ #{% set name = '' %}
+ #{% set version = '' %}
+ #{% set number = '0' %}
+
+ about:
+ # Package homepage
+ home:
+ # Package license
+ license:
+ # A brief description
+ summary:
+
+ package:
+ # Define these values above
+ name: {{ name }}
+ version: {{ version }}
+
+ build:
+ # Define this value above
+ number: {{ number }}
+
+ source:
+ fn: {{ name }}-{{ version }}.tar.gz
+ url: http://example.com/example/{{ name }}-{{ version }}.tar.gz
+
+ requirements:
+ build:
+ # Dependencies required at BUILD-TIME go here
+ - setuptools
+ - python x.x
+ run:
+ # Dependencies required at RUN-TIME go here
+ # - ...
+
+ #test:
+ # imports:
+ # # - (e.g. a_python_module)
+ #
+ # commands:
+ # # - (e.g. program --help)
+
+
+First, let's fill in the blanks. Modify the JINJA2 template markers for ``name``, ``version``:
+
+.. code-block:: none
+
+ {% set name = 'sympy' %}
+ {% set version = '1.0' %}
+
+Fill in the ``about`` section with relevant information regarding the package:
+
+.. code-block:: yaml
+
+ about:
+ home: http://sympy.org
+ license: GPL
+ summary: Python library for symbolic mathematics
+
+Next, modfy the ``source`` section's ``url`` variable so that it points to ``sympy``'s source archive (on the internet):
+
+.. code-block:: sh
+
+ source:
+ fn: {{ name }}-{{ version }}.tar.gz
+ url: https://github.com/{{ name }}/{{ name }}/releases/download/{{ name }}-{{ version }}/{{ name }}-{{ version }}.tar.gz
+
+What's with the never-ending stream of bracket encapsulated keywords, you ask? JINJA2 provides basic string interpolation. If you
+decide to build, for example, ``sympy-1.1`` in the future, you need only modify the first two settings in this file (assuming
+the URL structure has not changed).