Skip to content

Commit c959aba

Browse files
committed
init
0 parents  commit c959aba

5 files changed

Lines changed: 117 additions & 0 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.DS_Store
2+
/.build
3+
/Packages
4+
/*.xcodeproj

Package.swift

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// swift-tools-version:4.2
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
#if os(OSX)
7+
let pkgConfigName = "python3"
8+
#else
9+
let pkgConfigName = "python-3.5"
10+
#endif
11+
12+
let package = Package(
13+
name: "PerfectPython3API",
14+
pkgConfig: pkgConfigName,
15+
providers: [
16+
.brew(["python"]),
17+
.apt(["libpython3-dev"]),
18+
]
19+
)

README.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Perfect-Python3API
2+
3+
<p align="center">
4+
<a href="http://perfect.org/get-involved.html" target="_blank">
5+
<img src="http://perfect.org/assets/github/perfect_github_2_0_0.jpg" alt="Get Involed with Perfect!" width="854" />
6+
</a>
7+
</p>
8+
9+
<p align="center">
10+
<a href="https://github.com/PerfectlySoft/Perfect" target="_blank">
11+
<img src="http://www.perfect.org/github/Perfect_GH_button_1_Star.jpg" alt="Star Perfect On Github" />
12+
</a>
13+
<a href="https://gitter.im/PerfectlySoft/Perfect" target="_blank">
14+
<img src="http://www.perfect.org/github/Perfect_GH_button_2_Git.jpg" alt="Chat on Gitter" />
15+
</a>
16+
<a href="https://twitter.com/perfectlysoft" target="_blank">
17+
<img src="http://www.perfect.org/github/Perfect_GH_button_3_twit.jpg" alt="Follow Perfect on Twitter" />
18+
</a>
19+
<a href="http://perfect.ly" target="_blank">
20+
<img src="http://www.perfect.org/github/Perfect_GH_button_4_slack.jpg" alt="Join the Perfect Slack" />
21+
</a>
22+
</p>
23+
24+
<p align="center">
25+
<a href="https://developer.apple.com/swift/" target="_blank">
26+
<img src="https://img.shields.io/badge/Swift-4.2-orange.svg?style=flat" alt="Swift 4.2">
27+
</a>
28+
<a href="https://developer.apple.com/swift/" target="_blank">
29+
<img src="https://img.shields.io/badge/Platforms-OS%20X%20%7C%20Linux%20-lightgray.svg?style=flat" alt="Platforms OS X | Linux">
30+
</a>
31+
<a href="http://perfect.org/licensing.html" target="_blank">
32+
<img src="https://img.shields.io/badge/License-Apache-lightgrey.svg?style=flat" alt="License Apache">
33+
</a>
34+
<a href="http://twitter.com/PerfectlySoft" target="_blank">
35+
<img src="https://img.shields.io/badge/Twitter-@PerfectlySoft-blue.svg?style=flat" alt="PerfectlySoft Twitter">
36+
</a>
37+
<a href="https://gitter.im/PerfectlySoft/Perfect?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge" target="_blank">
38+
<img src="https://img.shields.io/badge/Gitter-Join%20Chat-brightgreen.svg" alt="Join the chat at https://gitter.im/PerfectlySoft/Perfect">
39+
</a>
40+
<a href="http://perfect.ly" target="_blank">
41+
<img src="http://perfect.ly/badge.svg" alt="Slack Status">
42+
</a>
43+
</p>
44+
45+
C module import for Python 3
46+
47+
This files in this repository are part of the requirements for Swift Package Manager support and should not need to be manually cloned.
48+
49+
[Perfect-Python](https://github.com/PerfectlySoft/Perfect-Python)
50+
51+
52+
## Quick start
53+
54+
### Mac OSX
55+
56+
Library installation:
57+
58+
59+
```
60+
$ sudo mkdir /usr/local/Frameworks
61+
$ sudo chown $(whoami):admin /usr/local/Frameworks
62+
$ brew install python
63+
```
64+
65+
66+
Verification:
67+
68+
```
69+
$ pkg-config python3 --libs --cflags
70+
```
71+
### Ubuntu 16.04 LTS
72+
73+
Library installation:
74+
75+
```
76+
$ sudo apt-get install -y libpython3-dev python3
77+
```
78+
79+
Verification:
80+
81+
```
82+
$ pkg-config python-3.5 --cflags --libs
83+
```
84+
85+
## Further Information
86+
For more information on the Perfect project, please visit [perfect.org](http://perfect.org).

module.modulemap

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module PerfectPython3API [system] {
2+
header "python3x.h"
3+
export *
4+
}

python3x.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#ifndef __PYTHON3XAPI__
2+
#define __PYTHON3XAPI__
3+
#include "Python.h"
4+
#endif

0 commit comments

Comments
 (0)