X-Recipient: archive-cygwin AT delorie DOT com X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E92C83857810 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=trueroad.jp Authentication-Results: sourceware.org; spf=none smtp.mailfrom=trueroad AT trueroad DOT jp Date: Sun, 31 Jan 2021 12:53:48 +0900 (JST) Message-Id: <20210131.125348.529339282301413911.trueroad@trueroad.jp> To: cygwin AT cygwin DOT com Subject: Re: python-cython C++ support patch From: Masamichi Hosoda In-Reply-To: <20210130.222850.1144915727792964409.trueroad@trueroad.jp> References: <20210129 DOT 193143 DOT 371461372727925270 DOT trueroad AT trueroad DOT jp> <7edac602-ab79-7421-f5f8-929c7fa68428 AT gmail DOT com> <20210130 DOT 222850 DOT 1144915727792964409 DOT trueroad AT trueroad DOT jp> X-Mailer: Mew version 6.8 on Emacs 27.1 Mime-Version: 1.0 X-VirusScan: Outbound; mvir-ac12; Sun, 31 Jan 2021 12:53:54 +0900 X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: trueroad AT trueroad DOT jp Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" >> PyMODINIT_FUNC unfortunately dos not work and my changes try >> to overcome it, see similar on >> >> https://sourceware.org/pipermail/cygwin/2021-January/247211.html >> >> but your portion is for additional C++ case >> than I am adding in asimilar way >> >> Regards >> Marco > > a test package has been just uploaded. > Try it and tell me if it solves your problem. > > Otherwise point me to your C++ code and I will look on it. > > Regards > Marco python38-cython-0.29.21-3 works fine with following test code. ```hello.pyx print('Hello World!') ``` ```setup.py from distutils.core import setup from Cython.Build import cythonize setup( ext_modules=cythonize( "hello.pyx", language="c++", ) ) ``` ```test.py import hello ``` Here's the result by python38-cython-0.29.21-2 (failed). ``` $ python setup.py build_ext --inplace [...snip...] $ python test.py Traceback (most recent call last): File "test.py", line 1, in import hello ImportError: dynamic module does not define module export function (PyInit_hello) ``` Here's the result by python38-cython-0.29.21-3 (succeeded). ``` $ python setup.py build_ext --inplace [...snip...] $ python test.py Hello World! ``` Thanks. -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple