473,689 Members | 2,839 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Haskell distutils-type system

Hello Python Community. I bring greetings from the Haskell community
(http://www.haskell.org) ;)

There has been a lot of discussion of late about creating a
grand-unified build & distribution system for "3rd party" Haskell
libraries (those not distributed with the compilers). Python's
Distutils has come up a few times. The Haskell Library Infrastructure
Project's web page is just a wiki page which can be found here:
http://www.haskell.org/hawiki/LibraryInfrastructure. I'm running this
project.

I also wear another hat in that I'm interested in maintaining Debian
packages related to Haskell, so I want to make my job easier by 1)
writing software support, and 2) making it easy for other people to
maintain Debian packages so I don't have to :)

I've read much of the documentation at
http://www.python.org/sigs/distutils-sig/doc/. I've also made a toy
Python program that uses distutils. It occurs to me that the issues
that were facing the Python community are strikingly similar to those
facing the Haskell community now, except perhaps for the fact that
there are at least 3 very strong Haskell "compilers" that we want to
support.

One idea for this distribution system, which we're calling the Library
Infrastructure Project, is to create a nice gmake-based build system,
document it, and leave it at that. Another idea is to use a
Haskell-based Distutils type system. Now I think that the
Haskell-based system should work out-of-the-box for pure-haskell
modules (no extensions), and maybe wrap a more complex make-based
system where necessary (as when interfacing with C or using
preprocessors). I definitely want to optimize for the common case of
joe-haskell-programmer wanting a nice way to distribute modules to his
friends, but of course I also want to allow Haskell developers to do
more complex things.

The main issues facing us are:

1) there are a variety of Haskell "compiler" implementations , one of
which is an interpreter :)

2) not all Haskell implementations are available on all architectures
(ghc for instance)

3) just about every Haskell "compiler" and release is
binary-incompatible, (except maybe for nhc98). That is, if we were
going to distribute binary libraries, we'd need different binaries for
ghc4, ghc5, and ghc6. Also we'd need different binaries for profiling
versions of the libraries, etc.

For instance, if I were to create a binary package HUnit, which is a
simple case since its pure Haskell code, I would need:
hunit-{hugs,nhc98} hunit-ghc{4,5,6} hunit-ghc{4,5,6}-prof

And whenever a new version of GHC6 is released (for instance), all of
the packages like hunit-ghc6 would need to be updated at the same
time. That doesn't even get into the issues of the wide variety of
preprocessors that are common in this rapidly advancing language[1].
So all of this suggests to me that we want to keep a global list of
installed libraries and recompile them whenever a new Haskell
"compiler" gets installed. This is why I want an abstraction layer
above make.

So I want to ask you if you can think of any obvious things we should
watch out for if we try to do something similar to what Python is
doing.

Also, there was some mention (in the related "summary of the
Developer's Day session") of Python's distutils creating a Makefile
and wrapping calls to make, is this what you're doing?

Do you / did you find yourself duplicating a lot of what make already
does, ie dependencies, etc, or do you utilize make?

What about configuration, do you typically interface with autoconf
somehow, or does distutils have its own way to figure out
configuration details?

Is a typical distutils setup.py program pretty much like what we see
in the example documentation? The developer provides some meta-data
and gets a distribution tool? Is there any support for more complex
stuff like interfacing with external systems?

Does distutils handle dependencies?

I've hacked together something that creates a source tarball and a
basic Debian package from a Haskell version of the distutils-type
metadata. I can make that available in a few days if anyone is
interested.

peace,

isaac

[1] Haskell is designed to have a "stable" version, Haskell98, and the
compilers come with a variety of extensions so that it is very useful
as a research language as well.

Jul 18 '05 #1
3 1970
On Tue, 2003-07-01 at 16:34, Gerhard Häring wrote:
Do you / did you find yourself duplicating a lot of what make already
does, ie dependencies, etc, or do you utilize make?


AFAIK Python's distutils doesn't know about dependencies.


It seems clear to me that distutils would have no use for make's
dependencies. distutils is for distribution of modules, not the
iterative development of those modules. When you build a C extension,
you are always going to compile every file, since you are starting from
scratch. Make's dependencies are only for speeding the developer's life
as they change individual files, it's not for the extension user or
installer.

Ian

Jul 18 '05 #2
Quoth Isaac Jones <ij****@syntaxp olice.org>:
....
| One idea for this distribution system, which we're calling the Library
| Infrastructure Project, is to create a nice gmake-based build system,
| document it, and leave it at that.

If it can be plain make, instead of gmake, that would be closer
my idea of "nice". That has been one of Python's strengths since
early on, easy to build on a variety of platforms and doesn't
impose gratuitous requirements like needing GNU make or Perl
(can you imagine?)

| ... Another idea is to use a
| Haskell-based Distutils type system.
....

| What about configuration, do you typically interface with autoconf
| somehow, or does distutils have its own way to figure out
| configuration details?

This is not one of distutils' strengths. I think the answer to both
is "no" - there isn't any useful interface to autoconf, and it doesn't
have a comparable ability to figure out configuration details. The
path of least resistance would probably be something analogous to
config.h.in, a config.hs.in that allows autoconfig to account for all
the options and environmental variables.

Donn Cave, do**@drizzle.co m
Jul 18 '05 #3
Quoth Isaac Jones <ij****@syntaxp olice.org>:
....
| One idea for this distribution system, which we're calling the Library
| Infrastructure Project, is to create a nice gmake-based build system,
| document it, and leave it at that.

If it can be plain make, instead of gmake, that would be closer
my idea of "nice". That has been one of Python's strengths since
early on, easy to build on a variety of platforms and doesn't
impose gratuitous requirements like needing GNU make or Perl
(can you imagine?)

| ... Another idea is to use a
| Haskell-based Distutils type system.
....

| What about configuration, do you typically interface with autoconf
| somehow, or does distutils have its own way to figure out
| configuration details?

This is not one of distutils' strengths. I think the answer to both
is "no" - there isn't any useful interface to autoconf, and it doesn't
have a comparable ability to figure out configuration details. The
path of least resistance would probably be something analogous to
config.h.in, a config.hs.in that allows autoconfig to account for all
the options and environmental variables.

Donn Cave, do**@drizzle.co m
Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1213
by: A.M. Kuchling | last post by:
I want to make a Distutils 1.1 release that wraps up the version of the code that was in Python 2.3. This would be the last 1.5.2-compatible release of Distutils, giving people the chance to use the current code with versions of Python from 1.5.2 to 2.3. A future Distutils 2.0 would then drop 1.5.2 compatibility. The README and related bits have been updated, and I've made a snapshot release that can be downloaded from...
1
2654
by: Mathieu Malaterre | last post by:
Hello, I thought this would be easy but I guess I didn't get the distutil feeling. I am trying to write a setup for install my package but I don't understand how to do that. organisation: setup.py /bin/
15
4118
by: Colin J. Williams | last post by:
The distutils download page has: -------------------------------------------------------- Current stable release The current stable release is Distutils 1.0.2; you can download it as: * Distutils-1.0.2.tar.gz (source distribution) (233k) * Distutils-1.0.2.zip (source distribution) (274k) * Distutils-1.0.2.win32.exe (Windows installer) (187k)
7
2301
by: Frans Englich | last post by:
This is silly. How do I access data files I've installed with distutils? In a portable, generic way, I want to find out what is the following path on most systems: /usr/local/lib/python2.4/lib/site-packages/foo/bar.txt How do I figure out the rest, if I know foo/bar.txt? sys.prefix doesn't get me far. I've googled, and looked in the python reference. I must be blind if the
0
1871
by: Maarten Sneep | last post by:
I'm trying to build PyBison on Mac OS X, and I'm running into some problems with the distutils. Just for starters: PyBison requires Pyrex. This is not a problem, and Pyrex seems to work without problems, at least the primes sample module shows a nice 25 to 30 fold speed increase over the pure python version. I used the distutils to create the module from the primes.pyx sample, following the setup.py from the PyBison distrubution:
1
2149
by: George van den Driessche | last post by:
Hi folks, I'm looking at packaging a project I'm working on using distutils. The project is for Windows and contains a COM server which needs registration, so the installer needs to be a little more complicated than usual. Looking at the options for the bdist_wininst command to distutils, I see it's possible to specify --install-script=<myinstallscript> which ought to do the trick. But to use this, myinstallscript itself must first be...
10
1729
by: Xah Lee | last post by:
A Haskell A Day: Manifesto This is my learning notes on Haskell. I call it a-Haskell-a-day. I've been programing since 1992, and am a top expert at the Mathematica↗ language. I've long wanted to learn Haskell. It is my habit to write down what i'm learning. I will send out a small tip of what i have learned every day. If you are experienced industrial programer, especially if you also have experience in a functional language, this...
6
2343
by: ajikoe | last post by:
Hello I tried to combine c++ and python together. So I follow from this website: http://kortis.to/radix/python_ext/ I have this code: # prmodule.c static PyObject *pr_isprime(PyObject *self, PyObject *args){ int n, input; if (!PyArg_ParseTuple(args, "i", &input))
7
4287
by: vedrandekovic | last post by:
Hello again, Is there any patch for python "distutils", for this ImportError: cannot import name log Regards, Vedran
0
1463
by: newbie73 | last post by:
OS: Vista Python 2.5.2.2 (ActiveState Software Installation) Running latest Cygwin release The error generated is pasted below - please help. - Luis ***************************************
0
8594
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8528
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8947
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8786
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7621
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4321
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2965
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2219
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1952
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.