From: Vivien Maisonneuve Date: Mon, 16 Jun 2014 16:33:25 +0000 (+0200) Subject: Makefile for virtualenv X-Git-Tag: 1.0~253 X-Git-Url: https://scm.cri.mines-paristech.fr/git/linpy.git/commitdiff_plain/36156a49062f344bee22bd87310b5e03f0955c5d?hp=f431ff9e62582cf7a4f12d17fb198c2fdaf47044 Makefile for virtualenv --- diff --git a/.gitignore b/.gitignore index d93c13c..6e4e70b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ /build/ /dist/ /MANIFEST +/pypol.egg-info/ +/venv/ __pycache__ -/venv diff --git a/Makefile b/Makefile index 8b3f1c4..edb6c69 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,6 @@ PYTHON=python3 +PIP=pip3 +VIRTUALENV=pyvenv RM=rm -rf .PHONY: default @@ -15,4 +17,12 @@ test: .PHONY: clean clean: - $(RM) build dist MANIFEST pypol/__pycache__ tests/__pycache__ venv + $(RM) build dist MANIFEST venv + $(RM) pypol.egg-info pypol/islhelper.*.so pypol/__pycache__ + $(RM) tests/__pycache__ + +.PHONY: venv +venv: + $(RM) venv + $(VIRTUALENV) venv + . venv/bin/activate; $(PIP) install -e . diff --git a/pypol/.gitignore b/pypol/.gitignore new file mode 100644 index 0000000..1476115 --- /dev/null +++ b/pypol/.gitignore @@ -0,0 +1 @@ +/islhelper.*.so diff --git a/pypol/linear.py b/pypol/linear.py index be30fad..e69600f 100644 --- a/pypol/linear.py +++ b/pypol/linear.py @@ -1,11 +1,12 @@ import functools import numbers -import json import ctypes, ctypes.util -from pypol import isl, islhelper from fractions import Fraction, gcd +from . import isl, islhelper + + libisl = ctypes.CDLL(ctypes.util.find_library('isl')) libisl.isl_printer_get_str.restype = ctypes.c_char_p diff --git a/setup.py b/setup.py index 08587b7..57aa813 100755 --- a/setup.py +++ b/setup.py @@ -8,6 +8,6 @@ setup( author='MINES ParisTech', packages=['pypol'], ext_modules = [ - Extension('pypol/islhelper', sources=['pypol/islhelper.c']) + Extension('pypol.islhelper', sources=['pypol/islhelper.c']) ] )