Skip to content
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

Pymod package splitting #186

Merged
merged 5 commits into from
Oct 22, 2018
Merged

Conversation

thomaslima
Copy link
Collaborator

Refactored the pymod package so that the CPython extensions were renamed to *.core. For example, klayout.db is now klayout.dbcore. Then, I created klayout.db which imports all names from klayout.dbcore, and added the PCellDeclarationHelper, for example, which is present in pya.

I had to change the folder structure a little bit due to a setuptools bug pypa/setuptools#230

I also had to create an empty folder named db_plugins inside src/pymod/distutils_src/klayout so that python setup.py develop would function properly. Now the editable install, i.e. pip install -e . works.

@klayoutmatthias
Copy link
Collaborator

Hi Thomas,

I have changed the version to .dev7 which is the next one available. Some conflicts I resolved (testing is yet to do).

Matthias

@klayoutmatthias klayoutmatthias merged commit 3074f05 into KLayout:pymod Oct 22, 2018
@klayoutmatthias
Copy link
Collaborator

klayoutmatthias commented Oct 22, 2018

Hi Thomas,

please consider merging b80ce12 into your pymod branch. I had to refactor (unify layout) the distutils_src directory to fix the qmake-based builds. Essentially tl.py git moved to tl/init.py. Same for rdb. Overall the solution is a good one as qmake-based pymod builds now use the same sources than the setup.py ones.

Thank,

Matthias

@thomaslima thomaslima deleted the pymod-splitting branch October 22, 2018 19:13
@thomaslima
Copy link
Collaborator Author

Sounds good. Nice work.
I am a bit confused though. Does it mean that normal qmake also builds pymod as well as setup.py? Is it supposed to build pymod because of the Qtbindings?

@klayoutmatthias
Copy link
Collaborator

No worries, nothing wrong :-) ... qmake-based Python modules were the first. They are still provided to supply the Python modules coming with the Debian and RPM packages. I see one more benefit: as they are integrated with the main application's build, they are part of the test suite. They basically share most of the source code with the setuptools-based distribution (again), so there is little overhead (except me having to maintain the qmake-builds and RPM/DEB packager scripts).

BTW: there are three more small patches, so maybe you may like to pull pymod's HEAD.

Thanks,

Matthias

@klayoutmatthias
Copy link
Collaborator

Plus one more commit ... (Python 2 compatibility)

@thomaslima
Copy link
Collaborator Author

Thanks for letting me know. I am going to take a break from maintaining travis builds. It seems they're going through some changes now and every time I have to change the travis script. This instability is killing me. When pymod gets merged to master I'll try to work on CD to pypi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants