-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tweaks Makefile and moves permissions there #8
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
BUILD_DIR = build | ||
DESCRIPTION = CS50 Library for Python | ||
MAINTAINER = CS50 <[email protected]> | ||
NAME = python-cs50 | ||
OLD_NAME = lib50-python | ||
VERSION = 1.2.4 | ||
BUILD_DIR := build | ||
LIB_DIR := $(BUILD_DIR)/usr/lib | ||
PYTHON2_DIR := $(LIB_DIR)/python2.7/dist-packages/cs50 | ||
PYTHON3_DIR := $(LIB_DIR)/python3/dist-packages/cs50 | ||
DESCRIPTION := CS50 Library for Python | ||
MAINTAINER := CS50 <[email protected]> | ||
NAME := python-cs50 | ||
OLD_NAME := lib50-python | ||
VERSION := 1.2.4 | ||
|
||
.PHONY: bash | ||
bash: | ||
docker run -i --rm -t -v "$(PWD)":/root cs50/cli | ||
|
||
.PHONY: build | ||
build: clean | ||
mkdir -p "$(BUILD_DIR)"/usr/lib/python2.7/dist-packages/cs50 | ||
cp src/* "$(BUILD_DIR)"/usr/lib/python2.7/dist-packages/cs50 | ||
mkdir -p "$(BUILD_DIR)"/usr/lib/python3/dist-packages/cs50 | ||
cp src/* "$(BUILD_DIR)"/usr/lib/python3/dist-packages/cs50 | ||
mkdir -p "$(PYTHON2_DIR)" "$(PYTHON3_DIR)" | ||
find "$(PYTHON2_DIR)" "$(PYTHON3_DIR)" -maxdepth 0 -exec cp src/* {} \; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why this cleverness? Why not just There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just didn't want to write |
||
chmod -R a+rX "$(PYTHON2_DIR)" "$(PYTHON3_DIR)" | ||
|
||
.PHONY: clean | ||
clean: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
#!/bin/bash | ||
|
||
pip3 install SQLAlchemy | ||
|
||
chmod -R a+rX /usr/lib/python2.7/dist-packages/cs50 | ||
chmod -R a+rX /usr/lib/python3/dist-packages/cs50 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we're (clearly) assuming Python 2.7 here. Is there a more dynamic way to figure out the right path on a system?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure yet! But even
sdist
(just emailed about) seems to assume this path, by default.