From 644329c0b8e72346f61a07d488679d12b2b00863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 27 Oct 2014 09:48:54 +0100 Subject: [PATCH 1/3] Preparing release of 1.1.1 --- CHANGELOG.md | 2 +- README.md | 27 +++++++++++++++------------ 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f0760dd4..503e66aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # OctoPrint Changelog -## 1.1.1 (Unreleased) +## 1.1.1 (2014-10-27) ### Improvements diff --git a/README.md b/README.md index f219d122..ac80de2e 100644 --- a/README.md +++ b/README.md @@ -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. From 87234bda0586c1e0b89ef93cfe6bfd1f651dcbb1 Mon Sep 17 00:00:00 2001 From: Colin Wallace Date: Mon, 3 Nov 2014 05:50:09 +0000 Subject: [PATCH 2/3] Fix missing branch field in DEFAULT dict Should fix an error raised on line 951 (SHORT_VERSION_PY % DEFAULT) during Octoprint setup when there's no version info. More info here: https://groups.google.com/forum/#!topic/deltabot/8udyUsJ1c9M --- versioneer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versioneer.py b/versioneer.py index 86c9a811..f88eb53e 100644 --- a/versioneer.py +++ b/versioneer.py @@ -809,7 +809,7 @@ def get_versions(default={}, verbose=False): """ -DEFAULT = {"version": "unknown", "full": "unknown"} +DEFAULT = {"version": "unknown", "full": "unknown", "branch": ""} def versions_from_file(filename): versions = {} From 5acb04c18061abb18e6b6610d9b4e9436d477318 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 4 Nov 2014 10:07:46 +0100 Subject: [PATCH 3/3] Fixed a couple of more missing branch fields and added Changelog entry --- CHANGELOG.md | 7 +++++++ src/octoprint/_version.py | 4 ++-- versioneer.py | 22 ++++++++++++---------- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 503e66aa..e6fafd52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # OctoPrint Changelog +## 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 diff --git a/src/octoprint/_version.py b/src/octoprint/_version.py index 3808a4f8..35090f5b 100644 --- a/src/octoprint/_version.py +++ b/src/octoprint/_version.py @@ -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 diff --git a/versioneer.py b/versioneer.py index f88eb53e..6b473324 100644 --- a/versioneer.py +++ b/versioneer.py @@ -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", "branch": ""} +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"