Skip to content
This repository has been archived by the owner on May 3, 2023. It is now read-only.

Commit

Permalink
1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
labsdeployuser authored and Data Labs committed Sep 16, 2020
1 parent 738b3bc commit 4cba1f2
Show file tree
Hide file tree
Showing 6 changed files with 204 additions and 17 deletions.
43 changes: 41 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,55 @@

## Installation

To install, you can use `pip`: ::
To install, you can use `pip`:

pip install git+https://github.com/pewresearch/pewanalytics#egg=pewanalytics

Or you can install from source: ::
Or you can install from source:

git clone https://github.com/pewresearch/pewanalytics.git
cd pewanalytics
python setup.py install

### Installation Troubleshooting

#### Using 64-bit Python

Some of our libraries require the use of 64-bit Python. If you encounter errors during installation \
that are related to missing libraries, you may be using 32-bit Python. We recommend that you uninstall \
this version and switch to a 64-bit version instead. On Windows, these will be marked with `x86-64`; you \
can find the latest 64-bit versions of Python [here](https://www.python.org/downloads).

#### Installing ssdeep

ssdeep is an optional dependency that can be used by the `get_hash` function in Pewtils. \
Installation instructions for various Linux distributions can be found in the library's \
[documentation](https://python-ssdeep.readthedocs.io/en/latest/installation.html). The ssdeep \
Python library is not currently compatible with Windows. \
Installing ssdeep on Mac OS may involve a few additional steps, detailed below:

1. Install Homebrew
2. Install xcode
```
xcode-select --install
```
3. Install system dependencies
```
brew install pkg-config libffi libtool automake
ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize
```
4. Install ssdeep with an additional flag to build the required libraries
```
BUILD_LIB=1 pip install ssdeep
```
5. If step 4 fails, you may need to redirect your system to the new libraries by setting the following flags:
```
export LIBTOOL=`which glibtool`
export LIBTOOLIZE=`which glibtoolize`
```
Do this and try step 4 again.
6. Now you should be able to run the main installation process detailed above.
## Documentation
Please refer to the [official documentation](https://pewresearch.github.io/pewanalytics/) for information on how to use this package.
Expand Down
56 changes: 54 additions & 2 deletions docs/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ hidden clusters and groups. This package contains a collection of tools designed
Installation
---------------

To install, you can use ``pip``: ::
To install, you can use ``pip``:

pip install git+https://github.com/pewresearch/pewanalytics#egg=pewanalytics

Or you can install from source: ::
Or you can install from source:

git clone https://github.com/pewresearch/pewanalytics.git
cd pewanalytics
Expand All @@ -33,3 +33,55 @@ Or you can install from source: ::
This is a Python 3 package. Though it is compatible with Python 2, many of its dependencies are \
planning to drop support for earlier versions if they haven't already. We highly recommend \
you upgrade to Python 3.

Installation Troubleshooting
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Using 64-bit Python
""""""""""""""""""""

Some of our libraries require the use of 64-bit Python. If you encounter errors during installation \
that are related to missing libraries, you may be using 32-bit Python. We recommend that you uninstall \
this version and switch to a 64-bit version instead. On Windows, these will be marked with ``x86-64``; you \
can find the latest 64-bit versions of Python `here <http://www.python.org/downloads>`_.

Installing ssdeep
""""""""""""""""""""""""""""

ssdeep is an optional dependency that can be used by the :py:func:`pewtils.get_hash` function in Pewtils. \
Installation instructions for various Linux distributions can be found in the library's \
`documentation <https://python-ssdeep.readthedocs.io/en/latest/installation.html>`_. The ssdeep \
Python library is not currently compatible with Windows. \
Installing ssdeep on Mac OS may involve a few additional steps, detailed below:

1. Install Homebrew

2. Install xcode

.. code-block:: bash
xcode-select --install
3. Install system dependencies

.. code-block:: bash
brew install pkg-config libffi libtool automake
ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize
4. Install ssdeep with an additional flag to build the required libraries

.. code-block:: bash
BUILD_LIB=1 pip install ssdeep
5. If step 4 fails, you may need to redirect your system to the new libraries by setting the following flags:

.. code-block:: bash
export LIBTOOL=`which glibtool`
export LIBTOOLIZE=`which glibtoolize`
Do this and try step 4 again.

6. Now you should be able to run the main installation process detailed above.
62 changes: 54 additions & 8 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,19 +163,65 @@ <h1>Pew Analytics<a class="headerlink" href="#pew-analytics" title="Permalink to
<div class="section" id="installation">
<h2>Installation<a class="headerlink" href="#installation" title="Permalink to this headline"></a></h2>
<p>To install, you can use <code class="docutils literal notranslate"><span class="pre">pip</span></code>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="n">git</span><span class="o">+</span><span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">pewresearch</span><span class="o">/</span><span class="n">pewanalytics</span><span class="c1">#egg=pewanalytics</span>
</pre></div>
</div>
<blockquote>
<div><p>pip install git+https://github.com/pewresearch/pewanalytics#egg=pewanalytics</p>
</div></blockquote>
<p>Or you can install from source:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">pewresearch</span><span class="o">/</span><span class="n">pewanalytics</span><span class="o">.</span><span class="n">git</span>
<span class="n">cd</span> <span class="n">pewanalytics</span>
<span class="n">python</span> <span class="n">setup</span><span class="o">.</span><span class="n">py</span> <span class="n">install</span>
</pre></div>
</div>
<blockquote>
<div><p>git clone <a class="reference external" href="https://github.com/pewresearch/pewanalytics.git">https://github.com/pewresearch/pewanalytics.git</a>
cd pewanalytics
python setup.py install</p>
</div></blockquote>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This is a Python 3 package. Though it is compatible with Python 2, many of its dependencies are planning to drop support for earlier versions if they haven’t already. We highly recommend you upgrade to Python 3.</p>
</div>
<div class="section" id="installation-troubleshooting">
<h3>Installation Troubleshooting<a class="headerlink" href="#installation-troubleshooting" title="Permalink to this headline"></a></h3>
<div class="section" id="using-64-bit-python">
<h4>Using 64-bit Python<a class="headerlink" href="#using-64-bit-python" title="Permalink to this headline"></a></h4>
<p>Some of our libraries require the use of 64-bit Python. If you encounter errors during installation that are related to missing libraries, you may be using 32-bit Python. We recommend that you uninstall this version and switch to a 64-bit version instead. On Windows, these will be marked with <code class="docutils literal notranslate"><span class="pre">x86-64</span></code>; you can find the latest 64-bit versions of Python <a class="reference external" href="http://www.python.org/downloads">here</a>.</p>
</div>
<div class="section" id="installing-ssdeep">
<h4>Installing ssdeep<a class="headerlink" href="#installing-ssdeep" title="Permalink to this headline"></a></h4>
<p>ssdeep is an optional dependency that can be used by the <code class="xref py py-func docutils literal notranslate"><span class="pre">pewtils.get_hash()</span></code> function in Pewtils. Installation instructions for various Linux distributions can be found in the library’s <a class="reference external" href="https://python-ssdeep.readthedocs.io/en/latest/installation.html">documentation</a>. The ssdeep Python library is not currently compatible with Windows. Installing ssdeep on Mac OS may involve a few additional steps, detailed below:</p>
<ol class="arabic">
<li><p>Install Homebrew</p></li>
<li><p>Install xcode</p>
<blockquote>
<div><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>xcode-select --install
</pre></div>
</div>
</div></blockquote>
</li>
<li><p>Install system dependencies</p>
<blockquote>
<div><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>brew install pkg-config libffi libtool automake
ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize
</pre></div>
</div>
</div></blockquote>
</li>
<li><p>Install ssdeep with an additional flag to build the required libraries</p>
<blockquote>
<div><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nv">BUILD_LIB</span><span class="o">=</span><span class="m">1</span> pip install ssdeep
</pre></div>
</div>
</div></blockquote>
</li>
<li><p>If step 4 fails, you may need to redirect your system to the new libraries by setting the following flags:</p>
<blockquote>
<div><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">LIBTOOL</span><span class="o">=</span><span class="sb">`</span>which glibtool<span class="sb">`</span>
<span class="nb">export</span> <span class="nv">LIBTOOLIZE</span><span class="o">=</span><span class="sb">`</span>which glibtoolize<span class="sb">`</span>
</pre></div>
</div>
<p>Do this and try step 4 again.</p>
</div></blockquote>
</li>
<li><p>Now you should be able to run the main installation process detailed above.</p></li>
</ol>
</div>
</div>
</div>
</div>

Expand Down
Loading

0 comments on commit 4cba1f2

Please sign in to comment.