---
title: "build apsw manually"
author: "mathgl"
date: "2014-01-06T01:22:15Z"
tags: []
categories: ["编程语言"]
slug: "build-apsw-manually"
draft: false
lastmod: "2014-01-06T01:22:15Z"
id: 1999279
url: "https://mathgl.iteye.com/blog/1999279"
---

download sqlite sources and copy all files to apsw/src

 

open setup.py

 

find in finalize\_options of apsw\_build\_ext class

 

comment ext.libraries.append('sqlite3')

 

find ext\_modules=[Extension("apsw",

                             \["src/apsw.c"] 

 

at the bottom 

 

and add sqlite3.c like

 

ext\_modules=[Extension("apsw",

                             \["src/apsw.c", "src/sqlite3.c"],

 

save and build it.