question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Question] Why is a "force included" package not deployed from sdist?

See original GitHub issue

Hi @ofek et al.,

I hope I’m not off-topic in asking this here. I apologize if I am.

I am using hatch in a project and “force including” a package from a directory outside the project’s directory like so:

[tool.hatch.build.force-include]
"../../Utils/Aws" = "Utils/AWS"

When I build my project with hatch build -t sdist I can see that the files in the above directory are included in the .tar.gz file alongside my project’s code directory.

However, when I install the .tar.gz using pip like so: pip install my-package.tar.gz --no-deps I find that my code fails when trying to import the Utils.AWS package. Having peeked in Lib/site-packages I can’t find the Utils directory there.

Am I missing something when building the .tar.gz. or in how I setup pyproject.toml?

Thanks, @urig

PS - I’ve noticed that the .tar.gz. file does not contain an “egg-info” directory with its SOURCES.txt file. Could this be related to my issue?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
urigcommented, Jun 26, 2022

Sorry. Will verify tomorrow morning and report.

0reactions
ofekcommented, Jun 26, 2022

Ah I see, this only affects dev mode/editable installations. I’ll fix

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Question] Why is a "force included" package not deployed from sdist ...
When I build my project with hatch build -t sdist I can see that the files in the above directory are included in...
Read more >
Python: Why does pip install not deploy my code from sdist?
when I install into a venv and look inside the Lib/site-packages directory for the venv I only see a directory called my_code-0.1-py3. 9....
Read more >
Deploy to `gh-pages` from a `dist` folder on the ... - gists · GitHub
my issue is when I clone down the whole repo again, the public directory will not exist, and break the relationship between the...
Read more >
Deploying with Setuptools — Flask Documentation (2.1.x)
In this case we assume your application is called yourapplication.py and you are not using a module, but a package. If you have...
Read more >
4. Package structure and distribution
Not all of this content will be included in the version of your package that you install or distribute to others. Typically, it's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found