Skip to content

Commit 4b89893

Browse files
Add way of installing parallel mod_wsgi-standalone package.
1 parent 2ec84a1 commit 4b89893

7 files changed

+69
-1
lines changed

MANIFEST.in

+1
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ include docs/_build/html/_static/css/*
1515
include docs/_build/html/_static/font/*
1616
include docs/_build/html/_static/js/*
1717
include docs/_build/html/_sources/*
18+
include pyproject.toml

README.rst

+15
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ distributions for Windows aren't always complete and are missing the files
108108
needed to compile additional Apache modules. By default, it is expected
109109
that Apache is installed in the directory ``C:/Apache24`` on Windows.
110110

111+
If you are on Linux, macOS or other UNIX type operating system and can't
112+
or don't want to use the system package for Apache, you can use ``pip``
113+
to install mod_wsgi, but you should use use the ``mod_wsgi-standalone``
114+
package on PyPi instead of the ``mod_wsgi`` package.
115+
111116
Installation into Apache
112117
------------------------
113118

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

154+
If you are using Linux, macOS or other UNIX type operating system, and you
155+
don't have Apache available, you can instead install mod_wsgi using::
156+
157+
pip install mod_wsgi-standalone
158+
159+
When installing ``mod_wsgi-standalone``, it will also install a version
160+
of Apache into your Python distribution. You can only use ``mod_wsgi-express``
161+
when using this variant of the package. The ``mod_wsgi-standalone`` package
162+
follows the same version numbering as the ``mod_wsgi`` package on PyPi.
163+
149164
If you are on Windows and your Apache distribution is not installed into
150165
the directory ``C:/Apache24``, first set the environment variable
151166
``MOD_WSGI_APACHE_ROOTDIR`` to the directory containing the Apache

docs/release-notes.rst

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Release Notes
55
.. toctree::
66
:maxdepth: 2
77

8+
release-notes/version-4.7.0
9+
810
release-notes/version-4.6.8
911
release-notes/version-4.6.7
1012
release-notes/version-4.6.6

docs/release-notes/version-4.7.0.rst

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
=============
2+
Version 4.7.0
3+
=============
4+
5+
Version 4.7.0 of mod_wsgi can be obtained from:
6+
7+
https://codeload.github.com/GrahamDumpleton/mod_wsgi/tar.gz/4.7.0
8+
9+
New Features
10+
------------
11+
12+
* Now releasing parallel ``mod_wsgi-standalone`` package to PyPi. This is
13+
the same as the ``mod_wsgi`` package, except that by installing the
14+
``mod_wsgi-standalone`` package, it will automatically trigger the
15+
``mod_wsgi-httpd`` package to install the Apache HTTPD server as part
16+
of your Python installation. When you run ``mod_wsgi-express`` it will
17+
use that Apache HTTPD server installation.
18+
19+
The ``mod_wsgi-standalone`` package is required where you need to install
20+
``mod_wsgi-express`` using its own Apache HTTPD installation due to no
21+
system Apache HTTPD server package being available, and the installation
22+
needs to be done using a ``requirements.txt`` file for ``pip`` or other
23+
package install manager. Using ``mod_wsgi-standalone`` will ensure
24+
that the ``mod_wsgi-httpd`` package is installed first before attempting
25+
to build and install mod_wsgi. This guarantee is not provided by ``pip``
26+
if you list ``mod_wsgi-httpd`` and ``mod_wsgi`` packages as two entries.
27+
28+
The version numbering of the ``mod_wsgi-standalone`` package will follow
29+
the ``mod_wsgi`` versioning.

package.sh

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
set -eo pipefail
4+
5+
rm -rf dist
6+
7+
rm -f pyproject.toml
8+
9+
python setup.py sdist
10+
11+
ln -s pyproject.toml.in pyproject.toml
12+
13+
python setup.py sdist
14+
15+
rm -f pyproject.toml

pyproject.toml.in

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools>=40.8.0", "wheel", "mod_wsgi-httpd==2.4.41.1"]
3+
build-backend = "setuptools.build_meta:__legacy__"

setup.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,9 @@ def _version():
544544

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

547-
setup(name = 'mod_wsgi',
547+
standalone = os.path.exists('pyproject.toml')
548+
549+
setup(name = standalone and 'mod_wsgi-standalone' or 'mod_wsgi',
548550
version = _version(),
549551
description = 'Installer for Apache/mod_wsgi.',
550552
long_description = long_description,
@@ -590,4 +592,5 @@ def _version():
590592
entry_points = { 'console_scripts':
591593
['mod_wsgi-express = mod_wsgi.server:main'],},
592594
zip_safe = False,
595+
install_requires = standalone and ['mod_wsgi-httpd==2.4.41.1'] or [],
593596
)

0 commit comments

Comments
 (0)