From 1662d7ea6ee0af6db0ba0f201208b9099d388080 Mon Sep 17 00:00:00 2001 From: Bastian Greshake Tzovaras Date: Tue, 25 Sep 2018 10:53:46 +0200 Subject: [PATCH] remove cruft in config_files work & simplify code --- docs/source/config_files.rst | 10 ---------- repo2docker/buildpacks/r.py | 4 +++- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/docs/source/config_files.rst b/docs/source/config_files.rst index e5d88a12..739e5efd 100644 --- a/docs/source/config_files.rst +++ b/docs/source/config_files.rst @@ -95,16 +95,6 @@ version of Ubuntu. We use ``apt.txt``, for example, to install LaTeX in our `example apt.txt for LaTeX `_. -``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`` ~~~~~~~~~~~~~~~ diff --git a/repo2docker/buildpacks/r.py b/repo2docker/buildpacks/r.py index 620fcd1f..6be41b06 100644 --- a/repo2docker/buildpacks/r.py +++ b/repo2docker/buildpacks/r.py @@ -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