Make dwave-optimization a native namespace package

Open
#304 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
build-system

Research direction

Start by reading the linked Cython issues and pull request #305, then inspect the Meson-driven Cython build and the current dwave/init.py workaround. Done means the package is a native namespace package and its Cython builds succeed without retaining the placeholder file.

Written by the indexing model from the issue text.

Description

bug enhancement

We'd like to change dwave-optimization to a native namespace package by removing dwave/__init__.py. However, doing so results in Cython builds failing. This is because Meson ultimately uses the cython ... command and that command cannot handle native namespace packages with relative imports, see https://github.com/cython/cython/issues/5335, https://github.com/cython/cython/issues/6287.

For now we leave a placeholder dwave/__init__.py in place, then discard it from the built wheel, see https://github.com/dwavesystems/dwave-optimization/pull/305.

I'll look into opening a issue/PR on Cython, as the linked issues are slightly different.

Dominant language
C++
Stars
31
Forks
36
Avg merge
1d 9h
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dwavesystems/dwave-optimization

All issues in dwavesystems/dwave-optimization

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.