Skip to content

Commit dda424c

Browse files
updates build files
1 parent 7afda6b commit dda424c

10 files changed

Lines changed: 49 additions & 16 deletions

File tree

.travis.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
sudo: required
2+
3+
branches:
4+
only:
5+
- master
6+
7+
matrix:
8+
include:
9+
- dist: trusty
10+
language: python
11+
services:
12+
- docker
13+
script:
14+
- ./make/manylinux1/build_wheels.sh
15+
- os: osx
16+
osx_image: xcode8.3
17+
script:
18+
- ./make/osx/build_wheels.sh
19+
20+
install:
21+
- if [ "${TRAVIS_OS_NAME:-}" == "osx" ]; then ./make/osx/install_python.sh; fi

Makefile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ clean-test: ## remove test and coverage artifacts
4848
rm -fr htmlcov/
4949

5050
lint: ## check style with flake8
51-
flake8 wolfssl tests
51+
flake8 src tests
5252

5353
test: ## run tests quickly with the default Python
5454
py.test tests
@@ -66,10 +66,9 @@ coverage: ## check code coverage quickly with the default Python
6666
coverage html
6767
$(BROWSER) htmlcov/index.html
6868

69-
docs: ## generate Sphinx HTML documentation, including API docs
69+
docs: install ## generate Sphinx HTML documentation, including API docs
7070
rm -f docs/wolfssl.rst
7171
rm -f docs/modules.rst
72-
sphinx-apidoc -o docs/ wolfssl
7372
$(MAKE) -C docs clean
7473
$(MAKE) -C docs html
7574
$(BROWSER) docs/_build/html/index.html
@@ -80,9 +79,9 @@ servedocs: docs ## compile the docs watching for changes
8079
dist: clean ## builds source and wheel package
8180
python setup.py sdist
8281

83-
./build_mac_os_x_wheels.sh
82+
./make/osx/build_wheels.sh
8483

85-
./build_linux_wheels.sh
84+
./make/manylinux1/build_wheels.sh
8685

8786
ls -l dist
8887

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Makefile for Sphinx documentation
22
#
3-
# Copyright (C) 2006-2017 wolfSSL Inc.
3+
# Copyright (C) 2006-2018 wolfSSL Inc.
44
#
55
# This file is part of wolfSSL. (formerly known as CyaSSL)
66
#

docs/conf.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# All configuration values have a default; values that are commented out
1313
# serve to show the default.
1414

15-
import os
15+
import wolfssl
1616
import sphinx_rtd_theme
1717

1818
# If extensions (or modules to document with autodoc) are in another directory,
@@ -52,20 +52,15 @@
5252

5353
# General information about the project.
5454
project = u'wolfssl Python'
55-
copyright = u'2017, wolfSSL Inc. All rights reserved'
55+
copyright = u'2018, wolfSSL Inc. All rights reserved'
5656
author = u'wolfSSL'
5757

5858
# The version info for the project you're documenting, acts as replacement for
5959
# |version| and |release|, also used in various other places throughout the
6060
# built documents.
6161
#
6262

63-
base_dir = os.path.join(os.path.dirname(__file__), os.pardir, "src")
64-
about = {}
65-
with open(os.path.join(base_dir, "wolfssl", "__about__.py")) as f:
66-
exec(f.read(), about)
67-
68-
version = release = about["__version__"]
63+
version = release = wolfssl.__version__
6964

7065
# The language for content autogenerated by Sphinx. Refer to documentation
7166
# for a list of supported languages.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ docker run \
77
-v `pwd`:/wolfssl-py \
88
-w /wolfssl-py \
99
wolfssl/manylinux1-x86_64 \
10-
bash -c "manylinux1/build_wheels.sh"
10+
bash -c "make/manylinux1/build.sh"

make/osx/install_python.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
set -x
4+
5+
URLS=(
6+
'https://www.python.org/ftp/python/2.7.14/python-2.7.14-macosx10.6.pkg'
7+
'https://www.python.org/ftp/python/3.4.4/python-3.4.4-macosx10.6.pkg'
8+
'https://www.python.org/ftp/python/3.5.4/python-3.5.4-macosx10.6.pkg'
9+
'https://www.python.org/ftp/python/3.6.4/python-3.6.4-macosx10.6.pkg'
10+
)
11+
12+
for url in "${URLS[@]}"; do
13+
curl -Lo /tmp/python.pkg "$url"
14+
sudo installer -pkg /tmp/python.pkg -target /
15+
done

requirements/docs.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-r prod.txt
2+
Sphinx
3+
sphinx_rtd_theme

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
#
4-
# Copyright (C) 2006-2017 wolfSSL Inc.
4+
# Copyright (C) 2006-2018 wolfSSL Inc.
55
#
66
# This file is part of wolfSSL. (formerly known as CyaSSL)
77
#

0 commit comments

Comments
 (0)