[Distutils] Re: Mixing pure python and extension module and multi
platform
M.-A. Lemburg
mal@lemburg.com
Wed Mar 19 15:43:04 2003
Berthold H=F6llmann wrote:
>>No, because 'pork.pork' is not allowed in py_modules (it's a hack
>>that sometimes works, but not intended as feature AFAIK).
>=20
> But even this changes do not cure the problem:
>=20
>>cat setup.py ; python setup.py -n install
As I wrote before: you have to explicitly *tell* distutils to
install in two different directories !
"""
packages/egenix-mx-base> python setup.py install --help
Global options:
--verbose (-v) run verbosely (default)
--quiet (-q) run quietly (turns verbosity off)
--dry-run (-n) don't actually do anything
--help (-h) show detailed help message
Options for 'mx_install' command:
--prefix installation prefix
--exec-prefix (Unix only) prefix for platform-specific files
--home (Unix only) home directory to install under
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
--install-base base installation directory (instead of --prefix o=
r --
home)
--install-platbase base installation directory for platform-specific =
files
(instead of --exec-prefix or --home)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--root install everything relative to this alternate root
directory
--install-purelib installation directory for pure Python module
distributions
--install-platlib installation directory for non-pure module distrib=
utions
--install-lib installation directory for all module distribution=
s
(overrides --install-purelib and --install-platlib=
)
--install-headers installation directory for C/C++ headers
--install-scripts installation directory for Python scripts
--install-data installation directory for data files
--compile (-c) compile .py to .pyc [default]
--no-compile don't compile .py files
--optimize (-O) also compile with optimization: -O1 for "python -O=
", -O2
for "python -OO", and -O0 to disable [default: -O0=
]
--force (-f) force installation (overwrite any existing files)
--skip-build skip rebuilding everything (for testing/debugging)
--record filename in which to record list of installed file=
s
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
"""
> from distutils.core import setup,Extension
>=20
> setup (name =3D "pork.spam",
> version =3D "0.0.0",
> description =3D "just a test",
> author =3D 'Berthold H=F6llmann',
> author_email =3D "hoel@GL-Group.com",
> ext_modules =3D [Extension('spam', ['spam.c'])],
> packages =3D ['pork']
> )
>=20
> Adding parser accelerators ...
> Done.
> running install
> running build
> running build_py
> not copying pork/pork.py (output up-to-date)
> not copying pork/__init__.py (output up-to-date)
> running build_ext
> skipping 'spam' extension (up-to-date)
> running install_lib
> copying build/lib.linux-i686-2.2/spam.so -> /usr/local/fitools/sandbox/=
linux/lib/python2.2/site-packages
> copying build/lib.linux-i686-2.2/pork/pork.py -> /usr/local/fitools/san=
dbox/linux/lib/python2.2/site-packages/pork
> copying build/lib.linux-i686-2.2/pork/__init__.py -> /usr/local/fitools=
/sandbox/linux/lib/python2.2/site-packages/pork
>=20
> the pure python package still gets installed alongside the only loosly
> extension module.
>=20
> Regards
> Berthold
--=20
Marc-Andre Lemburg
eGenix.com
Professional Python Software directly from the Source (#1, Mar 19 2003)
>>> Python/Zope Products & Consulting ... http://www.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
Python UK 2003, Oxford: 13 days left
EuroPython 2003, Charleroi, Belgium: 97 days left