Python module are no more called pyMODULE.so but MODULE.so
Since in CMakeLists.txt there is already a module target (for c++ library) and some file systems are not case sensitive, the target is still pyMODULE but the OUTPUT_NAME property is set to MODULE I've updated all the example python scripts.
This commit is contained in:
parent
91a82cdbfe
commit
8fca8eb26e
|
@ -1,12 +1,12 @@
|
||||||
import pyAGDS
|
import AGDS
|
||||||
lib = pyAGDS.Library("myTestLib")
|
lib = AGDS.Library("myTestLib")
|
||||||
lib.setUserUnits(0.001)
|
lib.setUserUnits(0.001)
|
||||||
lib.setPhysUnits(1.0e-9)
|
lib.setPhysUnits(1.0e-9)
|
||||||
|
|
||||||
active = pyAGDS.Rectangle( 6, 120, 290, 540, 690) # layer 6 corresponds to active
|
active = AGDS.Rectangle( 6, 120, 290, 540, 690) # layer 6 corresponds to active
|
||||||
poly = pyAGDS.Rectangle(17, 305, 150, 365, 830) # layer 17 corresponds to polysilicium
|
poly = AGDS.Rectangle(17, 305, 150, 365, 830) # layer 17 corresponds to polysilicium
|
||||||
|
|
||||||
str = pyAGDS.Structure("Transistor")
|
str = AGDS.Structure("Transistor")
|
||||||
str.addElement(active)
|
str.addElement(active)
|
||||||
str.addElement(poly)
|
str.addElement(poly)
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import pyCIF
|
import CIF
|
||||||
circuit = pyCIF.Circuit("Transistor", "micro", 0.001)
|
circuit = CIF.Circuit("Transistor", "micro", 0.001)
|
||||||
poly1 = pyCIF.Polygon(6)
|
poly1 = CIF.Polygon(6)
|
||||||
poly1.addPoint(130, 290)
|
poly1.addPoint(130, 290)
|
||||||
poly1.addPoint(540, 290)
|
poly1.addPoint(540, 290)
|
||||||
poly1.addPoint(540, 690)
|
poly1.addPoint(540, 690)
|
||||||
poly1.addPoint(130, 690)
|
poly1.addPoint(130, 690)
|
||||||
circuit.addPolygon(poly1)
|
circuit.addPolygon(poly1)
|
||||||
|
|
||||||
poly2 = pyCIF.Polygon(17)
|
poly2 = CIF.Polygon(17)
|
||||||
poly2.addPoint(305, 150);
|
poly2.addPoint(305, 150);
|
||||||
poly2.addPoint(365, 150);
|
poly2.addPoint(365, 150);
|
||||||
poly2.addPoint(365, 830);
|
poly2.addPoint(365, 830);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from pyDTR import *
|
from DTR import *
|
||||||
|
|
||||||
techno = Techno(Name("myTech"), Name("micro"))
|
techno = Techno(Name("myTech"), Name("micro"))
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from pyDTR import *
|
from DTR import *
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
|
|
||||||
techno = Techno.readFromFile("./example.dtr.xml")
|
techno = Techno.readFromFile("./example.dtr.xml")
|
||||||
|
|
|
@ -21,6 +21,7 @@ IF(Boost_FOUND)
|
||||||
ADD_LIBRARY(pyAGDS MODULE ${pycpps})
|
ADD_LIBRARY(pyAGDS MODULE ${pycpps})
|
||||||
SET_TARGET_PROPERTIES(pyAGDS PROPERTIES
|
SET_TARGET_PROPERTIES(pyAGDS PROPERTIES
|
||||||
COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1"
|
COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1"
|
||||||
|
OUTPUT_NAME "AGDS"
|
||||||
PREFIX ""
|
PREFIX ""
|
||||||
)
|
)
|
||||||
TARGET_LINK_LIBRARIES(pyAGDS agds ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
|
TARGET_LINK_LIBRARIES(pyAGDS agds ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
|
||||||
|
|
|
@ -9,7 +9,7 @@ using namespace boost::python;
|
||||||
#include "vlsisapd/agds/Rectangle.h"
|
#include "vlsisapd/agds/Rectangle.h"
|
||||||
|
|
||||||
namespace AGDS {
|
namespace AGDS {
|
||||||
BOOST_PYTHON_MODULE(pyAGDS) {
|
BOOST_PYTHON_MODULE(AGDS) {
|
||||||
// class AGDS::Element
|
// class AGDS::Element
|
||||||
class_<Element, boost::noncopyable>("Element", no_init) // abstract class : noncopyable + no_init
|
class_<Element, boost::noncopyable>("Element", no_init) // abstract class : noncopyable + no_init
|
||||||
;
|
;
|
||||||
|
|
|
@ -18,6 +18,7 @@ IF(Boost_FOUND)
|
||||||
ADD_LIBRARY(pyCIF MODULE ${pycpps})
|
ADD_LIBRARY(pyCIF MODULE ${pycpps})
|
||||||
SET_TARGET_PROPERTIES(pyCIF PROPERTIES
|
SET_TARGET_PROPERTIES(pyCIF PROPERTIES
|
||||||
COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1"
|
COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1"
|
||||||
|
OUTPUT_NAME "CIF"
|
||||||
PREFIX ""
|
PREFIX ""
|
||||||
)
|
)
|
||||||
TARGET_LINK_LIBRARIES(pyCIF cif ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
|
TARGET_LINK_LIBRARIES(pyCIF cif ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
|
||||||
|
|
|
@ -7,7 +7,7 @@ using namespace boost::python;
|
||||||
#include "vlsisapd/cif/Circuit.h"
|
#include "vlsisapd/cif/Circuit.h"
|
||||||
|
|
||||||
namespace CIF {
|
namespace CIF {
|
||||||
BOOST_PYTHON_MODULE(pyCIF) {
|
BOOST_PYTHON_MODULE(CIF) {
|
||||||
// class CIF::Polygon
|
// class CIF::Polygon
|
||||||
class_<Polygon>("Polygon", init<long>())
|
class_<Polygon>("Polygon", init<long>())
|
||||||
.def("addPoint", &Polygon::addPoint)
|
.def("addPoint", &Polygon::addPoint)
|
||||||
|
|
|
@ -21,6 +21,7 @@ IF (Boost_FOUND)
|
||||||
ADD_LIBRARY(pyDTR MODULE ${pycpps})
|
ADD_LIBRARY(pyDTR MODULE ${pycpps})
|
||||||
SET_TARGET_PROPERTIES(pyDTR PROPERTIES
|
SET_TARGET_PROPERTIES(pyDTR PROPERTIES
|
||||||
COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1"
|
COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1"
|
||||||
|
OUTPUT_NAME "DTR"
|
||||||
PREFIX ""
|
PREFIX ""
|
||||||
)
|
)
|
||||||
TARGET_LINK_LIBRARIES(pyDTR dtr ${LIBXML2_LIBRARIES} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
|
TARGET_LINK_LIBRARIES(pyDTR dtr ${LIBXML2_LIBRARIES} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
|
||||||
|
|
|
@ -20,7 +20,7 @@ BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(getValueAsString_overloads, getValueAsStr
|
||||||
// specify that Techno::addRule method has optional arguments
|
// specify that Techno::addRule method has optional arguments
|
||||||
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(addRule_overloads, addRule, 3, 5);
|
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(addRule_overloads, addRule, 3, 5);
|
||||||
|
|
||||||
BOOST_PYTHON_MODULE(pyDTR) {
|
BOOST_PYTHON_MODULE(DTR) {
|
||||||
// class DTR::Name
|
// class DTR::Name
|
||||||
class_<Name>("Name", init<std::string>())
|
class_<Name>("Name", init<std::string>())
|
||||||
.def("getString", &Name::getString, return_value_policy<copy_const_reference>()) // return_value_policy because this method return a reference on string
|
.def("getString", &Name::getString, return_value_policy<copy_const_reference>()) // return_value_policy because this method return a reference on string
|
||||||
|
|
|
@ -36,6 +36,7 @@ IF(Boost_FOUND)
|
||||||
ADD_LIBRARY(pyOPENCHAMS MODULE ${pycpps})
|
ADD_LIBRARY(pyOPENCHAMS MODULE ${pycpps})
|
||||||
SET_TARGET_PROPERTIES(pyOPENCHAMS PROPERTIES
|
SET_TARGET_PROPERTIES(pyOPENCHAMS PROPERTIES
|
||||||
COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1"
|
COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1"
|
||||||
|
OUTPUT_NAME "OPENCHAMS"
|
||||||
PREFIX ""
|
PREFIX ""
|
||||||
)
|
)
|
||||||
TARGET_LINK_LIBRARIES(pyOPENCHAMS openChams ${LIBXML2_LIBRARIES} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
|
TARGET_LINK_LIBRARIES(pyOPENCHAMS openChams ${LIBXML2_LIBRARIES} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
|
||||||
|
|
|
@ -24,7 +24,7 @@ void translator(OpenChamsException const& e) {
|
||||||
PyErr_SetString(PyExc_UserWarning, e.what());
|
PyErr_SetString(PyExc_UserWarning, e.what());
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_PYTHON_MODULE(pyOPENCHAMS) {
|
BOOST_PYTHON_MODULE(OPENCHAMS) {
|
||||||
// class OpenChams::Name
|
// class OpenChams::Name
|
||||||
class_<Name>("Name", init<std::string>())
|
class_<Name>("Name", init<std::string>())
|
||||||
.def(init<>())
|
.def(init<>())
|
||||||
|
|
Loading…
Reference in New Issue