⬆ devel is now 2.0.0.dev & py3 only

This commit is contained in:
Gina Häußge committed 2020-06-16 18:12:38 +02:00
1 parent 0aed3c05cb
commit fcf60b2a9a
8 files changed
+26 -78

No files matched your search

+2 -2
View File
@@ -5,13 +5,13 @@ dist: xenial
matrix:
include:
- python: '3.7'
- python: '3.8'
env: RUN_FLAKE8=true
python:
- "3.8"
- "3.7"
- "3.6"
- "2.7"
install:
- pip install -e .[develop]
script:
+2 -2
View File
@@ -32,5 +32,5 @@ regressionfix/.* 1.4.0rc7 d99af420acb9d5b18a4f60f9cae8abb458e131d4 pep440-dev
# staging/devel is currently inactive (but has the 1.4.0rc7 namespace)
staging/devel 1.4.0rc7 d99af420acb9d5b18a4f60f9cae8abb458e131d4 pep440-dev
# every other branch is a development branch and thus gets resolved to 1.5.0-dev for now
.* 1.5.0 2da7aa358d950b4567aaab8f18d6b5779193e077 pep440-dev
# every other branch is a development branch and thus gets resolved to 2.0.0-dev for now
.* 2.0.0 2da7aa358d950b4567aaab8f18d6b5779193e077 pep440-dev
+2 -2
View File
@@ -61,7 +61,7 @@ which is a custom SD card image that includes OctoPrint plus dependencies.
The generic steps that should basically be done regardless of operating system
and runtime environment are the following (as *regular
user*, please keep your hands *off* of the `sudo` command here!) - this assumes
you already have Python 2.7, 3.6 or 3.7, pip and virtualenv set up on your system:
you already have Python 3.6, 3.7 or 3.8, pip and virtualenv set up on your system:
1. Create a user-owned virtual environment therein: `virtualenv venv`.
2. Install OctoPrint *into that virtual environment*: `./venv/bin/pip install OctoPrint`
@@ -84,7 +84,7 @@ access control as necessary.
OctoPrint depends on a few python modules to do its job. Those are automatically installed when installing
OctoPrint via `pip`.
OctoPrint currently supports Python 2.7, 3.6 and 3.7.
OctoPrint currently supports Python 3.6, 3.7 and 3.8.
## Usage
-1
View File
@@ -38,7 +38,6 @@ extensions = ['codeblockext', 'onlineinclude', 'sphinx.ext.todo', 'sphinx.ext.au
'sphinx.ext.napoleon', 'sphinxcontrib.mermaid', 'sphinx.ext.intersphinx']
todo_include_todos = True
intersphinx_mapping = {'python': ('https://docs.python.org/3', None),
'python2': ('https://docs.python.org/2', None),
'pyserial': ('https://pythonhosted.org/pyserial', None)}
# Add any paths that contain templates here, relative to this directory.
+12 -28
View File
@@ -13,8 +13,7 @@ below.
* Prerequisites:
* `Python 2.7 <https://python.org>`_ including ``pip``, ``setuptools`` and ``virtualenv``
* `Python 3.7 <https://python.org>`_ including ``pip``, ``setuptools`` and ``virtualenv``
* `Python 3.8 <https://python.org>`_ including ``pip``, ``setuptools`` and ``virtualenv``
* `Git <https://git-scm.com>`_
* Checkout the OctoPrint sources from their Git repository:
@@ -26,19 +25,17 @@ below.
installing and running OctoPrint and its dependencies (this avoids potential versioning issues for the dependencies
with system wide installed instances):
* PY2: ``virtualenv --python=python2 venv2``
* PY3: ``virtualenv --python=python3 venv3``
* ``virtualenv --python=python3 venv``
.. note::
This assumes that `python2` and `python3` are binaries available directly on your ``PATH``. If your Python 2 and 3
binaries cannot be found on your ``PATH`` like this you'll need to specify the full paths to them here,
e.g. ``virtualenv --python=/path/to/python2/bin/python venv2``
This assumes that `python3` is a binary available directly on your ``PATH``. If your Python 3
binary cannot be found on your ``PATH`` like this you'll need to specify the full path to it here,
e.g. ``virtualenv --python=/path/to/python3/bin/python venv``
* Activate one of the virtual environments:
* PY2: ``source venv2/bin/activate`` (Linux, macOS) or ``source venv2/Scripts/activate`` (Git Bash under Windows, see below)
* PY3: ``source venv3/bin/activate`` (Linux, macOS) or ``source venv3/Scripts/activate`` (Git Bash under Windows, see below)
* ``source venv/bin/activate`` (Linux, macOS) or ``source venv/Scripts/activate`` (Git Bash under Windows, see below)
* Update ``pip`` in the virtual environment:
@@ -47,7 +44,7 @@ below.
* Install OctoPrint in `"editable" mode <https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs>`_,
including its regular *and* development and plugin development dependencies:
* ``pip install -e '.[develop,plugins]'``
* ``pip install -e '.[develop,plugins,docs]'``
When the virtual environment is activated you can then:
@@ -78,20 +75,11 @@ installed:
.. code-block:: none
sudo apt-get install python python-pip python-dev python-setuptools python-virtualenv git libyaml-dev build-essential
* On zypper based distributions (example below for SLES 12 SP2):
.. code-block:: none
sudo zypper ar https://download.opensuse.org/repositories/devel:/languages:/python/SLE_12_SP2/ python_devel
sudo zypper ref
sudo zypper in python python-pip python-devel python-setuptools python-virtualenv git libyaml-devel
sudo zypper in -t pattern Basis-Devel
sudo apt-get install python3 python3-pip python3-dev python3-setuptools python3-virtualenv git libyaml-dev build-essential
.. todo::
Using a Linux distribution that doesn't use ``apt`` or ``zypper``? Please send a
Using a Linux distribution that doesn't use ``apt``? Please send a
`Pull Request <https://github.com/OctoPrint/OctoPrint/blob/master/CONTRIBUTING.md#pull-requests>`_ to get the necessary
steps into this guide!
@@ -124,12 +112,12 @@ location, please substitute accordingly.
First download & install:
* `Python 2.7.15 Windows x86 MSI installer <https://www.python.org/downloads/release/python-2715/>`_
* `The current Python 3.8 Windows x86 executable installer <https://www.python.org/downloads/windows/>`_
* make sure to have the installer add Python to the ``PATH`` and have it install ``pip`` too
* `Microsoft Visual C++ Compiler for Python 2.7 <http://www.microsoft.com/en-us/download/details.aspx?id=44266>`_
* `Git for Windows <https://git-for-windows.github.io/>`_
* `Build Tools for Visual Studio 2019 <https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019>`_
* `Git for Windows <https://git-scm.com/downloads>`_
Open the Git Bash you just installed and in that:
@@ -196,10 +184,6 @@ You'll need a user account with administrator privileges.
IDE Setup
---------
.. todo::
This guide is not yet adapted to the concurrent use of Python 2.7 and 3.7 environments during development.
.. todo::
Using another IDE than the ones below? Please send a
+1 -7
View File
@@ -8,9 +8,7 @@ __copyright__ = "Copyright (C) 2015 Gina Häußge - Released under terms of the
from sphinx.directives.code import CodeBlock
import sphinx.highlighting
from sphinx.highlighting import PygmentsBridge
from sphinx.ext import doctest
from sphinx.util.texescape import tex_hl_escape_map_new
from docutils import nodes
from docutils.parsers.rst import directives
@@ -209,10 +207,6 @@ class PygmentsBridgeExt(object):
# /MODIFIED
if self._bridge.dest == 'html':
return hlsource
else:
if not isinstance(hlsource, text_type): # Py2 / Pygments < 1.6
hlsource = hlsource.decode()
return hlsource.translate(tex_hl_escape_map_new)
class whitespace_highlighter(object):
@@ -258,6 +252,6 @@ def setup(app):
# custom node type
handler = (visit_literal_block_ext, depart_literal_block_ext)
app.add_node(literal_block_ext, html=handler, latex=handler, text=handler)
app.add_node(literal_block_ext, html=handler)
return dict(version="0.1")
+1 -1
View File
@@ -109,4 +109,4 @@ def setup(app):
app.add_directive("onlineinclude", OnlineIncludeDirective)
handler = (visit_onlineinclude, depart_onlineinclude)
app.add_node(OnlineIncludeDirective, html=handler, latex=handler, text=handler)
app.add_node(OnlineIncludeDirective, html=handler)
+6 -35
View File
@@ -13,8 +13,7 @@ import setuptools
#-----------------------------------------------------------------------------------------------------------------------
# Supported python versions
# we test against 2.7, 3.6 and 3.7, so that's what we'll mark as supported
PYTHON_REQUIRES = ">=2.7.9, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4"
PYTHON_REQUIRES = ">=3.6,<4"
# Requirements for setup.py
SETUP_REQUIRES = [
@@ -29,13 +28,12 @@ INSTALL_REQUIRES = [
# the following dependencies are non trivial to update since later versions introduce backwards incompatible
# changes that might affect plugins, or due to other observed problems
"markupsafe>=1.1,<2.0", # Jinja dependency, newer versions require Python 3
"tornado==5.1.1", # newer versions require Python 3
"markdown>=3.1,<3.2", # newer versions require Python 3
"regex!=2018.11.6", # avoid broken 2018.11.6. See #2874
# anything below this should be checked on releases for new versions
"tornado>=6.0.4,<7",
"markdown>=3.2.2,<4",
"flask>=1.1.2,<2",
"Jinja2>=2.11.2,<3",
"Flask-Login>=0.5,<0.6", # flask-login doesn't use semver & breaks stuff on minor version increases
@@ -70,15 +68,6 @@ INSTALL_REQUIRES = [
"blinker>=1.4,<2" # dependency of flask_principal
]
# Python 2 specific requirements
INSTALL_REQUIRES_PYTHON2 = [
"futures>=3.3,<4",
"monotonic>=1.5,<2",
"scandir>=1.10,<2",
"chainmap>=1.0.3,<2",
"typing>=3.7.4.1,<4"
]
# OSX specific requirements
INSTALL_REQUIRES_OSX = [
"appdirs>=1.4.4",
@@ -88,9 +77,8 @@ INSTALL_REQUIRES_OSX = [
EXTRA_REQUIRES = dict(
# Dependencies for developing OctoPrint
develop=[
# Testing dependencies - SEE ALSO tox.ini
"mock>=3.0.5,<4",
"pytest==4.6.10",
# Testing dependencies
"pytest>=5.4.3,<6",
"pytest-doctest-custom>=1.0.0,<2",
"ddt",
@@ -119,22 +107,7 @@ EXTRA_REQUIRES = dict(
# Dependency links for any of the aforementioned dependencies
DEPENDENCY_LINKS = []
# adapted from https://hynek.me/articles/conditional-python-dependencies/
if int(setuptools.__version__.split(".", 1)[0]) < 18:
# no bdist_wheel support for setuptools < 18 since we build universal wheels and our optional dependencies
# would get lost there
assert "bdist_wheel" not in sys.argv
# add optional dependencies for setuptools versions < 18 that don't yet support environment markers
if sys.version_info[0] < 3:
INSTALL_REQUIRES += INSTALL_REQUIRES_PYTHON2
if sys.platform == "darwin":
INSTALL_REQUIRES += INSTALL_REQUIRES_OSX
else:
# environment markers supported
EXTRA_REQUIRES[":python_version < '3'"] = INSTALL_REQUIRES_PYTHON2
EXTRA_REQUIRES[":sys_platform == 'darwin'"] = INSTALL_REQUIRES_OSX
EXTRA_REQUIRES[":sys_platform == 'darwin'"] = INSTALL_REQUIRES_OSX
#-----------------------------------------------------------------------------------------------------------------------
# Anything below here is just command setup and general setup configuration
@@ -238,8 +211,6 @@ def params():
"Natural Language :: German",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",