Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #38796

Re: Python Makefiles... are they possible?

References <e8d436e1-f226-4a81-968f-295c51198198@googlegroups.com>
From Oscar Benjamin <oscar.j.benjamin@gmail.com>
Date 2013-02-13 01:00 +0000
Subject Re: Python Makefiles... are they possible?
Newsgroups comp.lang.python
Message-ID <mailman.1731.1360717275.2939.python-list@python.org> (permalink)

Show all headers | View raw


On 13 February 2013 00:44, Malcolm White <white.m88@gmail.com> wrote:
> I have written a piece of code that will be part of a larger repository of related programs. Within this repository, it is standard to issue a 'make' command to compile any desired program. Is it possible to create a Makefile to compile a simple Python program? Based on what I have come across so far, this is not (at least not typically) the way things are done with Python.

You can use a Makefile for anything you want in a Python project.
However Python code is not (typically) compiled so it is not common
practise to compile it with or without a Makefile. When part of a
Python project is compiled because, for example it bundles some C code
to be used within Python, the compilation needs to performed in way
that will be compatible with Python so the process is normally
controlled by Python, through a setup.py file. In this case
compilation is done with something like 'python setup.py build' (Of
course there's nothing to stop you from adding that command to a
Makefile and invoking it with 'make').

I often use Makefiles in Python projects for other purposes, though,
such as running tests with 'make test' or building documentation with
'make doc'.


Oscar

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Python Makefiles... are they possible? Malcolm White <white.m88@gmail.com> - 2013-02-12 16:44 -0800
  Re: Python Makefiles... are they possible? Joel Goldstick <joel.goldstick@gmail.com> - 2013-02-12 19:55 -0500
  Re: Python Makefiles... are they possible? Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-02-13 01:00 +0000
    Re: Python Makefiles... are they possible? Roy Smith <roy@panix.com> - 2013-02-12 20:06 -0500
      Re: Python Makefiles... are they possible? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-13 05:54 +0000
        Re: Python Makefiles... are they possible? Benjamin Schollnick <benjamin@schollnick.net> - 2013-02-13 05:45 -0500
        Re: Python Makefiles... are they possible? Dave Angel <d@davea.name> - 2013-02-13 08:33 -0500
        Re: Python Makefiles... are they possible? Roy Smith <roy@panix.com> - 2013-02-13 08:44 -0500
          Re: Python Makefiles... are they possible? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-14 13:46 +1100
            Re: Python Makefiles... are they possible? Roy Smith <roy@panix.com> - 2013-02-13 22:02 -0500
            Re: Python Makefiles... are they possible? Chris Angelico <rosuav@gmail.com> - 2013-02-14 17:43 +1100

csiph-web