Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4c53f15

Browse files
author
Kareem Zidane
committedFeb 27, 2017
tweaks for CI and CD
1 parent 46aeb6b commit 4c53f15

File tree

9 files changed

+47
-46
lines changed

9 files changed

+47
-46
lines changed
 

‎.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.*
22
!.gitignore
3-
*.pyc
4-
__pycache__/
5-
build/
3+
!.travis.yml
4+
dist/
5+
*.egg-info/

‎.travis.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
language: python
2+
3+
python: "3.4"
4+
5+
# build sdist
6+
script: make build
7+
8+
# install twine for uploading to PyPI
9+
before_deploy: pip install twine
10+
11+
deploy:
12+
provider: script
13+
14+
# upload to PyPI
15+
script: twine upload -u $PYPI_USERNAME -p $PYPI_PASSWORD dist/*
16+
17+
# avoid stashing sdist
18+
skip_cleanup: true

‎Makefile

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,11 @@
1-
BUILD_DIR = build
2-
DESCRIPTION = CS50 Library for Python
3-
MAINTAINER = CS50 <sysadmins@cs50.harvard.edu>
4-
NAME = python-cs50
5-
OLD_NAME = lib50-python
6-
VERSION = 1.3.0
7-
8-
.PHONY: bash
9-
bash:
10-
docker run -i --rm -t -v "$(PWD)":/root cs50/cli
11-
121
.PHONY: build
132
build: clean
14-
mkdir -p "$(BUILD_DIR)"/usr/lib/python2.7/dist-packages/cs50
15-
cp src/* "$(BUILD_DIR)"/usr/lib/python2.7/dist-packages/cs50
16-
mkdir -p "$(BUILD_DIR)"/usr/lib/python3/dist-packages/cs50
17-
cp src/* "$(BUILD_DIR)"/usr/lib/python3/dist-packages/cs50
3+
python setup.py sdist
184

195
.PHONY: clean
206
clean:
21-
rm -rf "$(BUILD_DIR)"
7+
rm -rf *.egg-info dist
228

23-
.PHONY: deb
24-
deb: build
25-
fpm \
26-
-C "$(BUILD_DIR)" \
27-
-m "$(MAINTAINER)" \
28-
-n "$(NAME)" \
29-
-p "$(BUILD_DIR)" \
30-
-s dir \
31-
-t deb \
32-
-v "$(VERSION)" \
33-
--after-install after-install.sh \
34-
--conflicts "$(NAME) (<< $(VERSION)), $(OLD_NAME)" \
35-
--deb-no-default-config-files \
36-
--depends python \
37-
--depends python3 \
38-
--description "$(DESCRIPTION)" \
39-
--replaces "$(NAME) (<= $(VERSION)), $(OLD_NAME)" \
40-
--provides "$(NAME)" \
41-
--provides "$(OLD_NAME)" \
42-
usr
9+
.PHONY: install
10+
install: build
11+
pip install dist/cs50*.tar.gz

‎README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# CS50 Library for Python
22

3+
[![Build Status](https://travis-ci.org/cs50/python-cs50.svg?branch=master)](https://travis-ci.org/cs50/python-cs50)
4+
35
Supports Python 2 and Python 3.
46

57
## Development

‎after-install.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.

‎src/sql.py renamed to ‎cs50/sql.py

File renamed without changes.

‎setup.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from setuptools import setup
2+
3+
setup(
4+
author="CS50",
5+
author_email="sysadmins@cs50.harvard.edu",
6+
classifiers=[
7+
"Intended Audience :: Developers",
8+
"Programming Language :: Python",
9+
"Programming Language :: Python :: 3",
10+
"Topic :: Software Development :: Libraries :: Python Modules"
11+
],
12+
description="CS50 library for Python",
13+
install_requires=["SQLAlchemy"],
14+
keywords="cs50",
15+
name="cs50",
16+
packages=["cs50"],
17+
url="https://github.com/cs50/python-cs50",
18+
version="1.3.0"
19+
)

0 commit comments

Comments
 (0)
Please sign in to comment.