remove cruft in config_files work & simplify code

pull/406/head
Bastian Greshake Tzovaras 2018-09-25 10:53:46 +02:00
rodzic 9751c807fd
commit 1662d7ea6e
2 zmienionych plików z 3 dodań i 11 usunięć

Wyświetl plik

@ -95,16 +95,6 @@ version of Ubuntu.
We use ``apt.txt``, for example, to install LaTeX in our
`example apt.txt for LaTeX <https://github.com/binder-examples/latex/blob/master/apt.txt>`_.
``setup.py``
~~~~~~~~~~~~
To install your repository like a Python package, you may include a
``setup.py`` file. repo2docker installs ``setup.py`` files by running
``pip install -e .``.
While one can specify dependencies in ``setup.py``,
repo2docker **requires configuration files such as** ``environment.yml`` or
``requirements.txt`` to install dependencies during the build process.
``DESCRIPTION``
~~~~~~~~~~~~~~~

Wyświetl plik

@ -69,11 +69,13 @@ class RBuildPack(PythonBuildPack):
"""
# If no date is found, then self.checkpoint_date will be False
# Otherwise, it'll be a date object, which will evaluate to True
if bool(self.checkpoint_date):
if self.checkpoint_date:
return True
description_R = 'DESCRIPTION'
if not os.path.exists('binder') and os.path.exists(description_R):
if not self.checkpoint_date:
# no R snapshot date set through runtime.txt
# set the R runtime to the latest date that is guaranteed to be on MRAN across timezones
self._checkpoint_date = datetime.date.today() - datetime.timedelta(days=2)
self._runtime = "r-{}".format(str(self._checkpoint_date))
return True