Skip to content

Commit

Permalink
Add way of installing parallel mod_wsgi-standalone package.
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamDumpleton committed Dec 20, 2019
1 parent 2ec84a1 commit 4b89893
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 1 deletion.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ include docs/_build/html/_static/css/*
include docs/_build/html/_static/font/*
include docs/_build/html/_static/js/*
include docs/_build/html/_sources/*
include pyproject.toml
15 changes: 15 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ distributions for Windows aren't always complete and are missing the files
needed to compile additional Apache modules. By default, it is expected
that Apache is installed in the directory ``C:/Apache24`` on Windows.

If you are on Linux, macOS or other UNIX type operating system and can't
or don't want to use the system package for Apache, you can use ``pip``
to install mod_wsgi, but you should use use the ``mod_wsgi-standalone``
package on PyPi instead of the ``mod_wsgi`` package.

Installation into Apache
------------------------

Expand Down Expand Up @@ -146,6 +151,16 @@ standard location, you can set and export the ``APXS`` environment variable
to the location of the Apache ``apxs`` script for your Apache installation
before performing the installation.

If you are using Linux, macOS or other UNIX type operating system, and you
don't have Apache available, you can instead install mod_wsgi using::

pip install mod_wsgi-standalone

When installing ``mod_wsgi-standalone``, it will also install a version
of Apache into your Python distribution. You can only use ``mod_wsgi-express``
when using this variant of the package. The ``mod_wsgi-standalone`` package
follows the same version numbering as the ``mod_wsgi`` package on PyPi.

If you are on Windows and your Apache distribution is not installed into
the directory ``C:/Apache24``, first set the environment variable
``MOD_WSGI_APACHE_ROOTDIR`` to the directory containing the Apache
Expand Down
2 changes: 2 additions & 0 deletions docs/release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Release Notes
.. toctree::
:maxdepth: 2

release-notes/version-4.7.0

release-notes/version-4.6.8
release-notes/version-4.6.7
release-notes/version-4.6.6
Expand Down
29 changes: 29 additions & 0 deletions docs/release-notes/version-4.7.0.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
=============
Version 4.7.0
=============

Version 4.7.0 of mod_wsgi can be obtained from:

https://codeload.github.com/GrahamDumpleton/mod_wsgi/tar.gz/4.7.0

New Features
------------

* Now releasing parallel ``mod_wsgi-standalone`` package to PyPi. This is
the same as the ``mod_wsgi`` package, except that by installing the
``mod_wsgi-standalone`` package, it will automatically trigger the
``mod_wsgi-httpd`` package to install the Apache HTTPD server as part
of your Python installation. When you run ``mod_wsgi-express`` it will
use that Apache HTTPD server installation.

The ``mod_wsgi-standalone`` package is required where you need to install
``mod_wsgi-express`` using its own Apache HTTPD installation due to no
system Apache HTTPD server package being available, and the installation
needs to be done using a ``requirements.txt`` file for ``pip`` or other
package install manager. Using ``mod_wsgi-standalone`` will ensure
that the ``mod_wsgi-httpd`` package is installed first before attempting
to build and install mod_wsgi. This guarantee is not provided by ``pip``
if you list ``mod_wsgi-httpd`` and ``mod_wsgi`` packages as two entries.

The version numbering of the ``mod_wsgi-standalone`` package will follow
the ``mod_wsgi`` versioning.
15 changes: 15 additions & 0 deletions package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

set -eo pipefail

rm -rf dist

rm -f pyproject.toml

python setup.py sdist

ln -s pyproject.toml.in pyproject.toml

python setup.py sdist

rm -f pyproject.toml
3 changes: 3 additions & 0 deletions pyproject.toml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools>=40.8.0", "wheel", "mod_wsgi-httpd==2.4.41.1"]
build-backend = "setuptools.build_meta:__legacy__"
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,9 @@ def _version():

long_description = open('README.rst').read()

setup(name = 'mod_wsgi',
standalone = os.path.exists('pyproject.toml')

setup(name = standalone and 'mod_wsgi-standalone' or 'mod_wsgi',
version = _version(),
description = 'Installer for Apache/mod_wsgi.',
long_description = long_description,
Expand Down Expand Up @@ -590,4 +592,5 @@ def _version():
entry_points = { 'console_scripts':
['mod_wsgi-express = mod_wsgi.server:main'],},
zip_safe = False,
install_requires = standalone and ['mod_wsgi-httpd==2.4.41.1'] or [],
)

0 comments on commit 4b89893

Please sign in to comment.