473,657 Members | 2,727 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python PostgreSQL frontend for Win2K with MinGW32 ?

Hi,

This is just as much a PostgreSQL question as a Python one, but here
goes...

I've been trying to port the psycopg interface to a Win2K client
(server runs FreeBSD). I'm using MinGW32 rather than CygWin, and having
trouble compiling the libpg library as a DLL.

I started off with the following:

configure --with-template=win --without-zlib
make -C src/interfaces install

After complaints that I was missing "Makefile.p ort" I took
a copy from Makefile.win.

My Win2K/MSYS/MinGW32 setup doesn't have netinet/in.h, ioctl.h, inet.h,
or arpa.h, so I removed the #includes to these header files in
pg_config.h. I sort of assumed that none of these would be needed, and I
would end up linking to the Windows socket library instead of all the
Unix stuff. Massive overoptimism replaced by confusion and gloom.

The dlltool can't find a lot of the socket call targets, fe-connect.c
and fe-misc.c being the main offenders.

Can anyone help, please? I know there are some psycopg enthusiasts
about; I'd be very grateful for some pointers. I'd rather use MinGW32
than CygWin; I could swap but my understanding was that MinGW has all
that's required.

Alternatively, are there any VC++ Studio binaries available? Not that
I approve of course ;-)

Cheers,
Dave

Jul 18 '05 #1
2 2065
In article <3f********@m k-nntp-1.news.uk.world online.com>, Dave Haynes wrote:
I've been trying to port the psycopg interface to a Win2K client
(server runs FreeBSD). I'm using MinGW32 rather than CygWin, and having
trouble compiling the libpg library as a DLL.


Have you tried any of these?

http://www.stickpeople.com/projects/python/psycopg/

There are also pyPgSQL win32 binaries at http://pypgsql.sf.net

Dave Cook

Jul 18 '05 #2
Dave Haynes wrote:
Hi,

This is just as much a PostgreSQL question as a Python one, but here
goes...

I've been trying to port the psycopg interface to a Win2K client
(server runs FreeBSD). I'm using MinGW32 rather than CygWin, and having
trouble compiling the libpg library as a DLL. [...]


I'd recommend you statically link in libpq into your Python PostgreSQL
interface. That's what I'm doing for the win32 releases of pyPgSQL. I'm
also, like you, using mingw for these and I use this patch I created
many moons ago:

http://pypgsql.sourceforge.net/misc/postgresql.html

HTH,

-- Gerhard

Jul 18 '05 #3

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

Similar topics

6
2400
by: Chris Gonnerman | last post by:
I'll be quick. Here's a transcript: C:\usr\WConio-1.5>python setup.py build --compiler=mingw32 running build running build_py running build_ext building '_WConio' extension writing build\temp.win32-2.3\Release\_WConio.def C:\MINGW32\BIN\dllwrap.exe -mno-cygwin -mdll -static --output-lib build\temp.win
3
2286
by: dbrown2 | last post by:
I'm trying to understand and document how to install pypar on Win2k. Pypar needs to be installed with some MPI library code and also needs libpython23.a and other files which are not included with the python Windows binary installation. I've got that worked out but still no success. Here's the error message I'm seeing: >python setup.py install >running install
2
4260
by: C. Barnes | last post by:
Normally, one uses the following procedure to build and install a C/C++ extension: python setup.py build --compiler=your_compiler python setup.py install For Python 2.3.3 on Windows, with the Mingw (Minimalist GNU) compiler, the following steps must be taken:
6
2268
by: Graeme Matthew | last post by:
Hi All I have noticed that there are a numbe rof client libraries for connecting to Postgres. Can anyone tell me what is the recommended Python library for database connections many thanks
1
1341
by: benevilent | last post by:
Hey, I am embedding Python in an application, and have an efficency concern about this. There is a Python method which is called from the main application (written in C) many times per second (I am using the PyObject_Call function). Unfortunately this seems to be a bottleneck, as when the performance is compared to another language frontend of this application, when there involves many transitions from the core application to the...
13
7277
by: Zlatko Matiæ | last post by:
Is it possible to use Access as front-end for POstgreSQL and how ? What about Access Projects (.adp) and PostgreSQL ?
28
2618
by: H J van Rooyen | last post by:
Hi, I want to write a small system that is transaction based. I want to split the GUI front end data entry away from the file handling and record keeping. Now it seems almost trivially easy using the sockets module to communicate between machines on the same LAN, so that I want to do the record keeping on one machine.
6
2227
by: JW | last post by:
I have a lousy little Python extension, generated with the generous help of Pyrex. In Linux, things are simple. I compile the extension, link it against some C stuff, and *poof*! everything works. My employer wants me to create a Windows version of my extension that works with the vanilla Python 2.5 from python.org. My employment contract states that I won't be required to run Windows, and I desperately want to honor that clause....
1
6489
by: bogie | last post by:
Dear Friend I have some question related to postgresql frontend. I have develop postgresql web based database under linux environment and I use Gedafe as frontend and Apache as server. and now i am trying to build my database under window, the problem is that Gedafe is not working in Window environment, so my question, is anyone know which frontend that i can use on window environment which is freeware like gedafe and may be have the same...
0
8306
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
8825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
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
7327
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...
1
6164
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4152
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...
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.