Skip to content

Commit

Permalink
Merge branch '1.0.x' into 'master'
Browse files Browse the repository at this point in the history
  • Loading branch information
remram44 committed Dec 7, 2020
2 parents a82ba28 + 9339a86 commit 979ff8b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/developerguide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ The ``METADATA/trace.sqlite3`` file is the original trace generated by the C tra
Structure
'''''''''

An unpacker is a Python module. It can be distributed separately or be a part of a bigger distribution, given that it is declared in that distribution's ``setup.py`` as an `entry_point` to be registered with `pkg_resources` (see `setuptools' dynamic discovery of services and plugins <https://setuptools.readthedocs.io/en/latest/setuptools.html#dynamic-discovery-of-services-and-plugins>`__ section). You should declare a function as `entry_point` ``reprounzip.unpackers``. The name of the entry_point (before ``=``) will be the *reprounzip* subcommand, and the value is a callable that will get called with the :class:`argparse.ArgumentParser` object for that subcommand.
An unpacker is a Python module. It can be distributed separately or be a part of a bigger distribution, given that it is declared in that distribution's ``setup.py`` as an `entry_point` to be registered with `pkg_resources` (see `setuptools' advertising behavior section <https://setuptools.readthedocs.io/en/latest/userguide/entry_point.html#advertising-behavior>`__). You should declare a function as `entry_point` ``reprounzip.unpackers``. The name of the entry_point (before ``=``) will be the *reprounzip* subcommand, and the value is a callable that will get called with the :class:`argparse.ArgumentParser` object for that subcommand.

The package :mod:`reprounzip.unpackers` is a namespace package, so you should be able to add your own unpackers there if you want to. Please remember to put the correct code in the ``__init__.py`` file (which you can copy from `here <https://github.com/ViDA-NYU/reprozip/blob/master/reprounzip/reprounzip/unpackers/__init__.py>`__) so that namespace packages work correctly.

Expand Down
4 changes: 2 additions & 2 deletions docs/gui.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Installation

If you are using Anaconda, you can install *reprounzip-qt* from anaconda.org::

$ conda install --channel vida-nyu reprounzip-qt
$ conda install --channel conda-forge reprounzip-qt

Otherwise, you will need to `install PyQt5 <https://www.riverbankcomputing.com/software/pyqt/download5>`__ (or `PyQt4 <https://www.riverbankcomputing.com/software/pyqt/download>`__) before you can install *reprounzip-qt* from pip (on Debian or Ubuntu, you can use ``apt-get install pyqt5-dev``).
Otherwise, you will need to `install PyQt5 <https://www.riverbankcomputing.com/software/pyqt/download>`__ (or PyQt4 ) before you can install *reprounzip-qt* from pip (on Debian or Ubuntu, you can use ``apt-get install pyqt5-dev``).

On Linux, you will need to run the application one time so that it registers
itself as the handler for ``.rpz`` files.
Expand Down
4 changes: 2 additions & 2 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ Or you can install *reprounzip* and choose components manually::
Anaconda
========

*reprozip* and *reprounzip* can also be installed on the `Anaconda <https://www.anaconda.com/distribution/>`__ Python distribution, from anaconda.org::
*reprozip* and *reprounzip* can also be installed on the `Anaconda <https://www.anaconda.com/products/individual#Downloads>`__ Python distribution, from anaconda.org::

$ conda install --channel vida-nyu reprozip reprounzip reprounzip-docker reprounzip-vagrant reprounzip-vistrails
$ conda install --channel conda-forge reprozip reprounzip reprounzip-docker reprounzip-vagrant reprounzip-vistrails

Note, however, that *reprozip* is only available for Linux.
2 changes: 1 addition & 1 deletion docs/jupyter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ You can install *reprozip-jupyter* with pip::

Or Anaconda::

$ conda install reprozip-jupyter
$ conda install --channel conda-forge reprozip-jupyter

Once successfully installed, you should then enable the plugin for both the client and server side of Jupyter Notebooks::

Expand Down
5 changes: 2 additions & 3 deletions reprounzip-docker/reprounzip_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,19 +482,18 @@ def get_local_addr():
pass
else:
for address in addresses:
sock = None
try:
af, socktype, proto, canonname, sa = address
sock = socket.socket(af, socktype, proto)
sock.settimeout(1)
sock.connect(sa)
sock.close()
except socket.error:
pass
if sock is not None:
else:
addr = sock.getsockname()[0]
if isinstance(addr, bytes):
addr = addr.decode('ascii')
sock.close()
return addr

return '127.0.0.1'
Expand Down

0 comments on commit 979ff8b

Please sign in to comment.