Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
37d67eb1
Commit
37d67eb1
authored
24 years ago
by
D'Arcy J.M. Cain
Browse files
Options
Downloads
Patches
Plain Diff
Add WIN32 support.
parent
d584bf48
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/interfaces/python/pgmodule.c
+10
-2
10 additions, 2 deletions
src/interfaces/python/pgmodule.c
src/interfaces/python/setup.py
+18
-6
18 additions, 6 deletions
src/interfaces/python/setup.py
with
28 additions
and
8 deletions
src/interfaces/python/pgmodule.c
+
10
−
2
View file @
37d67eb1
...
...
@@ -91,6 +91,10 @@ const char *__movename[5] =
#define DEFAULT_VARS 1
/* enables default variables use */
#endif
/* NO_DEF_VAR */
#ifdef MS_WIN32
#define NO_SNPRINTF 1
#endif
/* --------------------------------------------------------------------- */
/* MODULE GLOBAL VARIABLES */
...
...
@@ -937,7 +941,12 @@ pgsource_print(pgsourceobject * self, FILE *fp, int flags)
/* query type definition */
staticforward
PyTypeObject
PgSourceType
=
{
#ifndef MS_WIN32
PyObject_HEAD_INIT
(
&
PyType_Type
)
#else
PyObject_HEAD_INIT
(
NULL
)
#endif
0
,
/* ob_size */
"pgsourceobject"
,
/* tp_name */
sizeof
(
pgsourceobject
),
/* tp_basicsize */
...
...
@@ -3075,8 +3084,7 @@ static struct PyMethodDef pg_methods[] = {
static
char
pg__doc__
[]
=
"Python interface to PostgreSQL DB"
;
/* Initialization function for the module */
void
init_pg
(
void
);
/* Python doesn't prototype this */
void
DL_EXPORT
(
void
)
init_pg
(
void
)
{
PyObject
*
mod
,
*
dict
,
*
v
;
...
...
This diff is collapsed.
Click to expand it.
src/interfaces/python/setup.py
+
18
−
6
View file @
37d67eb1
#!/usr/bin/env python
include_dirs
=
[
'
/usr/include/pgsql
'
]
library_dirs
=
[
'
usr/lib/pgsql
'
]
optional_libs
=
[
'
pq
'
]
# Setup script for the PyGreSQL version 3
# created 2000/04 Mark Alexander <mwa@gate.net>
# tweaked 2000/05 Jeremy Hylton <jeremy@cnri.reston.va.us>
# win32 support 2001/01 Gerhard Haering <gerhard@bigfoot.de>
# requires distutils; standard in Python 1.6, otherwise download from
# http://www.python.org/sigs/distutils-sig/download.html
...
...
@@ -22,6 +19,20 @@ optional_libs=['pq']
# on using distutils to install Python programs.
from
distutils.core
import
setup
import
sys
if
sys
.
platform
==
"
win32
"
:
# If you want to build from source; you must have built a win32 native libpq # before and copied libpq.dll into the PyGreSQL root directory.
win_pg_build_root
=
'
d:/dev/pg/postgresql-7.0.2/
'
include_dirs
=
[
win_pg_build_root
+
'
src/include
'
,
win_pg_build_root
+
'
/src/include/libpq
'
,
win_pg_build_root
+
'
src
'
,
win_pg_build_root
+
'
src/interfaces/libpq
'
]
library_dirs
=
[
win_pg_build_root
+
'
src/interfaces/libpq/Release
'
]
optional_libs
=
[
'
libpqdll
'
,
'
wsock32
'
,
'
advapi32
'
]
data_files
=
[
'
libpq.dll
'
]
else
:
include_dirs
=
[
'
/usr/include/pgsql
'
]
library_dirs
=
[
'
usr/lib/pgsql
'
]
optional_libs
=
[
'
pq
'
]
data_files
=
[]
setup
(
name
=
"
PyGreSQL
"
,
version
=
"
3.1
"
,
...
...
@@ -32,12 +43,13 @@ setup (name = "PyGreSQL",
licence
=
"
Python
"
,
py_modules
=
[
'
pg
'
,
'
pgdb
'
],
ext_modules
=
[
(
'
_pgmodule
'
,
{
ext_modules
=
[
Extension
(
name
=
'
_pg
'
,
'
sources
'
:
[
'
pgmodule.c
'
],
'
include_dirs
'
:
include_dirs
,
'
library_dirs
'
:
library_dirs
,
'
libraries
'
:
optional_libs
}
)]
data_files
=
data_files
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment