Commit graph

39 commits

Author SHA1 Message Date
Gina Häußge
697affc62d Merge branch 'fix/pmgrPipWithSudo' into devel
Conflicts:
	src/octoprint/plugins/pluginmanager/__init__.py
	src/octoprint/util/pip.py
2015-09-28 19:57:05 +02:00
Gina Häußge
1178fe9e95 Support sudo for installing plugins, but warn about it 2015-09-28 19:53:30 +02:00
Gina Häußge
2a4ee5072c Merge branch 'fix/pmgrPipConfig' into devel
Conflicts:
	src/octoprint/plugins/pluginmanager/__init__.py
	src/octoprint/util/pip.py
2015-09-22 11:39:02 +02:00
Gina Häußge
65bc28a03e PMGR: Added configuration dialog and info re used pip binary & version 2015-09-22 11:36:57 +02:00
Gina Häußge
f2c07e8f96 First throw at an "About" dialog 2015-09-03 17:08:15 +02:00
Gina Häußge
6f5c6f5404 PipCaller now manages special parameters on its own
The class knows about which pip versions support --process-dependency-links, which
need --no-use-wheel and which are broken altogether and adds/removes these parameters
accordingly or outright reports the broken pip version.
2015-07-23 15:00:47 +02:00
Gina Häußge
795c2c87f5 Merge branch 'maintenance' into devel
Conflicts:
	.versioneer-lookup
	CHANGELOG.md
	src/octoprint/plugins/pluginmanager/__init__.py
	src/octoprint/util/__init__.py
2015-07-23 12:22:02 +02:00
Gina Häußge
9a6099ffc2 PMGR: Dependency links can make pip install take longer
Depending on the pip version pip might first fetch the full index of packages available
on PyPI instead of just directly processing the provided link.

Display corresponding message to user from backend to make sure they don't
think something broke.
2015-07-23 10:54:39 +02:00
Gina Häußge
4dd4a2cc9c Revert "Remove dependency_links support again"
This reverts commit be423e49fd.

Conflicts:
	src/octoprint/plugins/pluginmanager/__init__.py
	src/octoprint/plugins/softwareupdate/updaters/pip.py
(cherry picked from commit c24ba82)
2015-07-22 19:06:39 +02:00
Gina Häußge
c24ba824d6 Revert "Remove dependency_links support again"
This reverts commit be423e49fd.

Conflicts:
	src/octoprint/plugins/pluginmanager/__init__.py
	src/octoprint/plugins/softwareupdate/updaters/pip.py
2015-07-22 16:57:32 +02:00
Gina Häußge
22d12ac54c Allow hiding plugins from Plugin Manager 2015-07-07 15:33:26 +02:00
Gina Häußge
8722cdadcd Merge branch 'maintenance' into devel
Conflicts:
	src/octoprint/plugins/softwareupdate/updaters/pip.py
	src/octoprint/util/pip.py
2015-07-05 10:15:14 +02:00
Gina Häußge
ae73ebdcb3 PMGR: console_logger was not properly defined in init 2015-07-03 13:57:15 +02:00
Gina Häußge
d7a86a4d28 Use UTF-8 for _all_ output from sarge
Lines taking from the asynchronous processing of stdout/stderr where
left as str, leading to encoding problems when utf8 characters showed
up in the stream and were being interpreted as ascii encoding.
(cherry picked from commit 9373be3)
2015-07-02 15:27:17 +02:00
Gina Häußge
1ab0a00700 Fix for deriving base version for old setuptools
Old versions of setuptools return a tuple for their
pkg_resources.parse_version method instead of a Version object with
a base_version attribute that we can use to retrieve the base version.

So some manually parsing is needed instead.
2015-07-02 10:48:46 +02:00
Gina Häußge
fe35086ad7 PMGR: Make sure we use OP's base version for compatibility
OctoPrint's version might be a prerelease version ("...dev<n>"), we
want that to still be able to pass plugin compatibility checks like the
final release version would, so always use the base version of
OctoPrint's current version for comparison during compatibility checks.
2015-07-01 10:20:09 +02:00
Gina Häußge
537c205757 Use lowercase when matching extensions
(cherry picked from commit 29cee16)
2015-06-30 19:12:58 +02:00
Gina Häußge
5e5531f6d8 Verify extension of uploaded language packs & plugins
Should be valid zip archives/tarballs. Also use only the extension
of an uploaded plugin archive as suffix for the temporary file that's
used for installing it.
(cherry picked from commit a1ff698)
2015-06-30 19:12:45 +02:00
Gina Häußge
29cee16d3e Use lowercase when matching extensions 2015-06-30 19:04:14 +02:00
Gina Häußge
a1ff6986ca Verify extension of uploaded language packs & plugins
Should be valid zip archives/tarballs. Also use only the extension
of an uploaded plugin archive as suffix for the temporary file that's
used for installing it.
2015-06-30 18:59:45 +02:00
Gina Häußge
bb0bfaee56 Fix: Increase max body size for plugin archives
Closes #957
(cherry picked from commit af89097)
2015-06-29 21:01:21 +02:00
Gina Häußge
af89097204 Fix: Increase max body size for plugin archives
Closes #957
2015-06-29 20:59:46 +02:00
Gina Häußge
b8209e8e09 Switch to pkg_resources for compatibility check
Plugin Manager now internally uses pkg_resources.parse_version and
pkg_resources.parse_requirements to check for version compatibility
with plugins from the repository. That will allow to directly use
the OctoPrint version string once it's PEP440 compatible.
(cherry picked from commit 8eb61a9)
2015-06-29 18:24:23 +02:00
Gina Häußge
8eb61a9926 Switch to pkg_resources for compatibility check
Plugin Manager now internally uses pkg_resources.parse_version and
pkg_resources.parse_requirements to check for version compatibility
with plugins from the repository. That will allow to directly use
the OctoPrint version string once it's PEP440 compatible.
2015-06-29 18:08:34 +02:00
Gina Häußge
016bdd542a Fix: More flexibility when parsing plugin compatibility
If compatibility information is provided only as a version number it's
prefixed with >= for the check (so stating a compatibility of only
1.2.0 will now make the plugin compatible to all versions that follow
too).

Alternatively the compatibility information may now contain stuff like
">=1.2,<1.3" in which case the plugin will only be shown as compatible
to OctoPrint versions 1.2 and up but not 1.3 or anything above that.
(cherry picked from commit d5692d7)
2015-06-29 10:22:10 +02:00
Gina Häußge
d5692d797d Fix: More flexibility when parsing plugin compatibility
If compatibility information is provided only as a version number it's
prefixed with >= for the check (so stating a compatibility of only
1.2.0 will now make the plugin compatible to all versions that follow
too).

Alternatively the compatibility information may now contain stuff like
">=1.2,<1.3" in which case the plugin will only be shown as compatible
to OctoPrint versions 1.2 and up but not 1.3 or anything above that.
2015-06-29 10:13:44 +02:00
Gina Häußge
e60cdc9d0f Adjusted bundled plugins to new data folder method 2015-06-24 14:33:33 +02:00
Gina Häußge
be423e49fd Remove dependency_links support again
Doesn't work reliably across pip versions, and adding a special rule for each and every version also isn't fun. Plugin authors will need to use a different approach for pulling in dependencies that are not on pypi during install, e.g. extra install urls or something like that. For now, I give up here ;)
2015-06-23 16:22:45 +02:00
Gina Häußge
71ccc47717 Plugin Manager: Use new PipCaller class and only provide dependency-links parameter if supported by pip version 2015-06-23 11:36:27 +02:00
Gina Häußge
326fc943b7 Plugin Manager: Cache repository list locally
Reduces requests against github upon server restarts.
2015-06-22 13:00:29 +02:00
Gina Häußge
61bd803942 Fix: Properly report if a plugin simply could not be found after installation
Also more resilience towards odd version numbers that get mangled by python's package management (1.2.3a0 => 1.2.3a)
2015-06-20 00:56:26 +02:00
Gina Häußge
f58d63bb49 pluginmanager: Reset flag for repository_available when refreshing it 2015-06-19 15:20:25 +02:00
Gina Häußge
0ce1575e12 Don't allow plugin management while the printer is printing 2015-06-18 11:37:08 +02:00
Gina Häußge
268886576f More resilience against wonky plugin compatibility data
(cherry picked from commit 5ed37e0)
2015-06-18 09:31:11 +02:00
Gina Häußge
46711ce365 pluginmanager: Support installing plugins that need --process-dependency-links
This might be necessary when plugins depend on (patched) library versions that are not yet released on PyPI
2015-06-10 19:34:33 +02:00
Gina Häußge
804d832544 Made name entry for Plugin Manager settings dialog translateable 2015-06-08 08:22:40 +02:00
Gina Häußge
27dcef3e23 New approach to matching up installed packages with plugins
Match against entry_point origins using both package name and package name plus version. If one of those matches (depends on pip version if output will include version or not), it's the plugin we are looking for.

This way we don't need to try to strip a version number from the package name as output by pip without knowing if a version number is included or not.
2015-06-03 10:46:58 +02:00
Mark Walker
35f2c6d788 Pip result parsing version numbers and extra lines
Some pip invocations return extra info after the Successfully installed
(like "Cleaning up...").  Also, not all packages include a version
number in their package names.
2015-06-02 23:31:03 -07:00
Gina Häußge
caef322b65 The Plugin Manager is now bundled with OctoPrint 2015-05-29 16:31:43 +02:00