Merge branch 'master' into devel

Conflicts:
	CHANGELOG.md
This commit is contained in:
Gina Häußge 2014-11-04 10:43:11 +01:00
commit eacfcab187
4 changed files with 38 additions and 25 deletions

View file

@ -42,6 +42,7 @@
* File management now supports STL files as first class citizens (including UI adjustments to allow management of
uploaded STL files including removal and reslicing) and also allows folders (not yet supported by UI)
* Also interpret lines starting with "!!" as errors
* Added deletion of pyc files to the `python setup.py clean` command
### Bug Fixes
@ -53,7 +54,14 @@
* [#625](https://github.com/foosel/OctoPrint/pull/625) - Newly added GCODE files were not being added to the analysis
queue
## 1.1.1 (Unreleased)
## 1.1.2 (Unreleased)
### Bug Fixes
* [#634](https://github.com/foosel/OctoPrint/pull/634) - Fixed missing `branch` fields in version dicts generated
by versioneer
## 1.1.1 (2014-10-27)
### Improvements

View file

@ -29,43 +29,45 @@ OctoPrint via `setup.py`:
python setup.py install
You should also do this after pulling from the repository, since the dependencies might have changed.
You should also do this every time after pulling from the repository, since the dependencies might have changed.
OctoPrint currently only supports Python 2.7.
Usage
-----
From the source directory you can start the server via
Running the `setup.py` script installs the `octoprint` script in your Python installation's scripts folder
(which depending on whether you installed OctoPrint globally or into a virtual env will be on your `PATH` or not). The
following usage examples assume that said `octoprint` script is on your `PATH`.
./run
You can start the server via
octoprint
By default it binds to all interfaces on port 5000 (so pointing your browser to `http://127.0.0.1:5000`
will do the trick). If you want to change that, use the additional command line parameters `host` and `port`,
which accept the host ip to bind to and the numeric port number respectively. If for example you want the server
to only listen on the local interface on port 8080, the command line would be
./run --host=127.0.0.1 --port=8080
octoprint --host=127.0.0.1 --port=8080
Alternatively, the host and port on which to bind can be defined via the configuration.
If you want to run OctoPrint as a daemon (only supported on Linux), use
./run --daemon {start|stop|restart} [--pid PIDFILE]
octoprint --daemon {start|stop|restart} [--pid PIDFILE]
If you do not supply a custom pidfile location via `--pid PIDFILE`, it will be created at `/tmp/octoprint.pid`.
You can also specify the configfile or the base directory (for basing off the `uploads`, `timelapse` and `logs` folders),
e.g.:
./run --config /path/to/another/config.yaml --basedir /path/to/my/basedir
octoprint --config /path/to/another/config.yaml --basedir /path/to/my/basedir
See `run --help` for further information.
Running the `setup.py` script also installs the `octoprint` startup script in your Python installation's scripts folder
(which depending on whether you installed OctoPrint globally or into a virtual env will be on your `PATH` or not). The
examples above also work with that startup script as it excepts the same parameters as `run`.
See `octoprint --help` for further information.
OctoPrint also ships with a `run` script in its source directory. You can also invoke that to start up the server, it
takes the same command line arguments as the `octoprint` script.
Configuration
-------------
@ -75,4 +77,5 @@ which is located at `~/.octoprint` on Linux, at `%APPDATA%/OctoPrint` on Windows
at `~/Library/Application Support/OctoPrint` on MacOS.
A comprehensive overview of all available configuration settings can be found
[on the wiki](https://github.com/foosel/OctoPrint/wiki/Configuration).
[on the wiki](https://github.com/foosel/OctoPrint/wiki/Configuration). Please note that the most commonly used
configuration settings can also easily be edited from OctoPrint's settings dialog.

View file

@ -214,7 +214,7 @@ def versions_from_parentdir(parentdir_prefix, root, verbose=False):
print("guessing rootdir is '%s', but '%s' doesn't start with prefix '%s'" %
(root, dirname, parentdir_prefix))
return None
return {"version": dirname[len(parentdir_prefix):], "full": ""}
return {"version": dirname[len(parentdir_prefix):], "full": "", "branch": ""}
tag_prefix = ""
parentdir_prefix = ""
@ -249,7 +249,7 @@ def parse_lookup_file(root, lookup_path=None):
break
return lookup
def get_versions(default={"version": "unknown", "full": ""}, lookup_path=None, verbose=False):
def get_versions(default={"version": "unknown", "full": "", "branch": "unknown"}, lookup_path=None, verbose=False):
# I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have
# __file__, we can work backwards from there to the root. Some
# py2exe/bbfreeze/non-CPython implementations don't do __file__, in which

View file

@ -473,7 +473,7 @@ def versions_from_parentdir(parentdir_prefix, root, verbose=False):
print("guessing rootdir is '%%s', but '%%s' doesn't start with prefix '%%s'" %%
(root, dirname, parentdir_prefix))
return None
return {"version": dirname[len(parentdir_prefix):], "full": ""}
return {"version": dirname[len(parentdir_prefix):], "full": "", "branch": ""}
tag_prefix = "%(TAG_PREFIX)s"
parentdir_prefix = "%(PARENTDIR_PREFIX)s"
@ -508,7 +508,7 @@ def parse_lookup_file(root, lookup_path=None):
break
return lookup
def get_versions(default={"version": "unknown", "full": ""}, lookup_path=None, verbose=False):
def get_versions(default={"version": "unknown", "full": "", "branch": "unknown"}, lookup_path=None, verbose=False):
# I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have
# __file__, we can work backwards from there to the root. Some
# py2exe/bbfreeze/non-CPython implementations don't do __file__, in which
@ -649,7 +649,8 @@ def versions_from_expanded_variables(variables, tag_prefix, verbose=False):
if verbose:
print("no suitable tags, using full revision id")
return { "version": variables["full"].strip(),
"full": variables["full"].strip() }
"full": variables["full"].strip(),
"branch": ""}
def versions_from_lookup(lookup, root, verbose=False):
@ -741,7 +742,7 @@ def versions_from_parentdir(parentdir_prefix, root, verbose=False):
print("guessing rootdir is '%s', but '%s' doesn't start with prefix '%s'" %
(root, dirname, parentdir_prefix))
return None
return {"version": dirname[len(parentdir_prefix):], "full": ""}
return {"version": dirname[len(parentdir_prefix):], "full": "", "branch": ""}
import os.path
import sys
@ -801,15 +802,13 @@ SHORT_VERSION_PY = """
version_version = '%(version)s'
version_full = '%(full)s'
version_branch = %(branch)r
version_branch = '%(branch)s'
def get_versions(default={}, verbose=False):
if version_branch:
return {'version': version_version, 'full': version_full, 'branch': version_branch}
return {'version': version_version, 'full': version_full}
return {'version': version_version, 'full': version_full, 'branch': version_branch}
"""
DEFAULT = {"version": "unknown", "full": "unknown"}
DEFAULT = {"version": "unknown", "full": "unknown", "branch": "unknown"}
def versions_from_file(filename):
versions = {}
@ -824,6 +823,9 @@ def versions_from_file(filename):
mo = re.match("version_full = '([^']+)'", line)
if mo:
versions["full"] = mo.group(1)
mo = re.match("version_branch = '([^']+)'", line)
if mo:
versions["branch"] = mo.group(1)
f.close()
return versions
@ -866,7 +868,7 @@ def parse_lookup_file(root, lookup_path=None):
return lookup
def get_versions(default=DEFAULT, verbose=False):
# returns dict with two keys: 'version' and 'full'
# returns dict with three keys: 'version', 'full' and 'branch'
assert versionfile_source is not None, "please set versioneer.versionfile_source"
assert tag_prefix is not None, "please set versioneer.tag_prefix"
assert parentdir_prefix is not None, "please set versioneer.parentdir_prefix"