Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/developer_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ started.
Installation
------------

See :ref:`quickstart` for setting up an installation. Use the "develop" option
when running ~/lnt/setup.py.
See :ref:`quickstart` for setting up an installation. Pass ``-e`` to ``pip`` when
installing the package to install it in "editable" mode.

Running LNT's Regression Tests
------------------------------
Expand Down
31 changes: 10 additions & 21 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,24 @@ Installation
The first thing to do is to checkout install the LNT software itself. The
following steps should suffice on any modern Unix variant:

#. Install ``virtualenv``, if necessary::

sudo easy_install virtualenv

``virtualenv`` is a standard Python tool for allowing the installation of
Python applications into their own sandboxes, or virtual environments.

#. Create a new virtual environment for the LNT application::

virtualenv ~/mysandbox

This will create a new virtual environment at ``~/mysandbox``.

#. Checkout the LNT sources::

git clone https://github.com/llvm/llvm-lnt.git ~/lnt

#. Create a new virtual environment for the LNT application and activate it::

python3 -m venv .venv
source .venv/bin/activate

#. Install LNT into the virtual environment::

~/mysandbox/bin/python ~/lnt/setup.py develop
pip install -r requirements.txt

We recommend using ``develop`` instead of install for local use, so that any
changes to the LNT sources are immediately propagated to your
installation. If you are running a production install or care a lot about
stability, you can use ``install`` which will copy in the sources and you
will need to explicitly re-install when you wish to update the LNT
application.
Note that if you only want to use the client-side features of ``lnt``, you can
install the requirements specified in ``requirements.client.txt`` instead, which
are a bit more lightweight.

That's it!
That's it! ``lnt`` should now be accessible from the virtual environment.


Running Tests
Expand Down
3 changes: 1 addition & 2 deletions lnt/lnttool/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,7 @@ def _version_check():
installed = "{} {}".format(meta['Name'], meta['Version'])
current = "{} {}".format(lnt.__name__, lnt.__version__)
raise SystemExit(f"""\
error: installed distribution {installed} is not current ({current}), you may need to reinstall
LNT or rerun 'setup.py develop' if using development mode.""")
error: installed distribution {installed} is not current ({current}), you may need to reinstall LNT""")


def show_version(ctx, param, value):
Expand Down
18 changes: 17 additions & 1 deletion requirements.client.txt
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
.
# These requirements are what you would install to run the client.
# The client has fewer requirements than the server code.
.
aniso8601==1.2.0
click==6.7
Flask-RESTful==0.3.4
Flask-WTF==0.12
Flask==0.12.2
itsdangerous==0.24
Jinja2==2.11.3
MarkupSafe==1.1.1
python-gnupg==0.3.7
pytz==2016.10
SQLAlchemy==1.3.24
Werkzeug==0.15.6
WTForms==2.0.2
pyyaml==5.1.2
17 changes: 2 additions & 15 deletions requirements.server.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
# These requirements are what you would install on a production server.
# The server has more requirements than the client.
.
aniso8601==1.2.0
click==6.7
Flask-RESTful==0.3.4
Flask-WTF==0.12
Flask==0.12.2
-r requirements.client.txt
gunicorn==19.9.0
itsdangerous==0.24
Jinja2==2.11.3
MarkupSafe==1.1.1
progressbar2
psycopg2==2.9.10
python-gnupg==0.3.7
pytz==2016.10
pyyaml==5.1.2
SQLAlchemy==1.3.24
Werkzeug==0.15.6
WTForms==2.0.2
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-r requirements.server.txt
-r requirements.server.txt
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
os.environ["CXX"] = "xcrun --sdk macosx clang"
cflags += ['-stdlib=libc++', '-mmacosx-version-min=10.7']

# TODO: Remove this once we assume that setup.py isn't called directly to install lnt
# setuptools expects to be invoked from within the directory of setup.py, but
# it is nice to allow:
# python path/to/setup.py install
Expand Down
12 changes: 0 additions & 12 deletions tests/utils/Installation.py

This file was deleted.

8 changes: 8 additions & 0 deletions tests/utils/installation-client.shtest
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Check that installation using the client requirements works properly.
#
# RUN: rm -rf %t.venv
# RUN: python -m venv %t.venv
# RUN: cd %{src_root}
# RUN: %t.venv/bin/python -m pip install -r requirements.client.txt
# RUN: rm -rf %t.installation
# RUN: %t.venv/bin/lnt create %t.installation
8 changes: 8 additions & 0 deletions tests/utils/installation-server.shtest
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Check that installation using the server requirements works properly.
#
# RUN: rm -rf %t.venv
# RUN: python -m venv %t.venv
# RUN: cd %{src_root}
# RUN: %t.venv/bin/python -m pip install -r requirements.server.txt
# RUN: rm -rf %t.installation
# RUN: %t.venv/bin/lnt create %t.installation
Loading