Questions tagged [sdist]

31 questions
46
votes
2 answers

What is the difference between an 'sdist' .tar.gz distribution and an python egg?

I am a bit confused. There seem to be two different kind of Python packages, source distributions (setup.py sdist) and egg distributions (setup.py bdist_egg). Both seem to be just archives with the same data, the python source files. One difference…
Peter Smit
  • 24,538
  • 27
  • 105
  • 165
30
votes
3 answers

python setup.py sdist only including .py source from top level module

I have a setup.py: from setuptools import setup setup( ... packages=['mypackage'], test_suite='mypackage.tests', ... ) python setup.py sdist creates a file that includes only the source modules from top-level mypackage…
user1561108
  • 2,497
  • 5
  • 38
  • 61
15
votes
1 answer

How to distribute files in a Python sdist that are not VCS tracked?

I would like to find the proper way to include files in a python sdist that are not tracked by git. Context The .mo files from my project are not tracked by git (like some other .txt files that need to be created at install time). I have written a…
zezollo
  • 3,451
  • 4
  • 21
  • 52
6
votes
1 answer

sdist error: option --manifest-only not recognized

Everytime I use sdist to creat the MANIFEST file with the command: 'python setup.py sdist --manifest-only' The terminal always outputs this error msg. error: option --manifest-only not recognized I don't know why and am looking for help.
higery
  • 63
  • 4
5
votes
1 answer

Force `sdist` to create .zip archive even on Linux

I know it is possible to force sdist to produce .zip from command line: python setup.py sdist --formats=zip But how to make this option a default for my setup.py? I'd like to get consistency for running setup.py sdist on both Windows and Linux, and…
anatoly techtonik
  • 17,421
  • 8
  • 111
  • 131
4
votes
0 answers

"Package directory does not exist" when running setup.py with sdist

I've got a game.py in ex48\ex48\game.py and my setup.py in ex48\docs\setup.py, I have init.py in both ex48\ex48__init.py and ex48\tests__init__.py . Game.py contains the following code: class lexicon(object): def __init__(self): pass def…
Cdhippen
  • 499
  • 7
  • 23
3
votes
1 answer

Output directories for python setup.py sdist bdist_wheel

When doing python setup.py sdist bdist_wheel it creates build, dist, packagename.egg-info directories. I'd like to have them out of the current folder. I tried: --dist-dir=../dist: works with sdist but packagename.egg-info is still…
Basj
  • 29,668
  • 65
  • 241
  • 451
3
votes
2 answers

Possible to create python sdist from different directory?

Want to create python source distribution by running python setup.py sdist from a directory outside of the one I want to package up. Can't seem to find a way to do this. I have a script that generates a setup.py and MANIFEST.in dynamically, and I'd…
chacmool
  • 1,163
  • 2
  • 13
  • 19
3
votes
0 answers

Is there a tool to check Python distribution (sdist) files?

We've had the case where we released a Python source distribution (sdist) file on PyPI, and there was an issue that was only noticed after making the release. Namely for some files, the permissions were set to not allow read by all, and then in some…
Christoph
  • 2,210
  • 1
  • 15
  • 22
3
votes
1 answer

Python generate sdist and upload it in a separate step

I am building several Python packages and would like to upload them only if all the packages have been successfully built. I have a separate stage for each Python package, whose sdist is carried to the last stage where all collected sdists should be…
linkyndy
  • 14,398
  • 14
  • 96
  • 180
2
votes
0 answers

Perform a command after pip install

I bundle my package as a sdist zip file , after that i can import my package anywhere using pip install , but i want to run some post install commands automatically after calling pip install. I cannot use python setup.py install because it is a…
Sajid Manzoor
  • 337
  • 3
  • 9
2
votes
1 answer

Running sDist to build a package and install creates empty Build Directory

created a setup file. with the following code where setup.py is import sys from distutils.core import setup setup( name='SomePackage', author='dave', version='0.1.0', author_email='dave', packages=['apples',], …
dfresh22
  • 750
  • 10
  • 19
2
votes
0 answers

Using sdist to package root source files that are in a subdirectory

I have the following file layout: setup.py build/ generated-sources/ foo.py With the following setup script: setup( package_dir={'': 'build/generated-sources'}, packages=['']) From the docs…
rsb
  • 920
  • 1
  • 8
  • 23
1
vote
0 answers

Python: update file output of sdist in setup.py

Is there a way to have sdist generate a .tar.gz with the python tag? Basically I am building two versions of my library (with python 3.5 and python 3.7). I can specify the python tag with bdist_wheel, but I am not sure how to specify it for…
user1179317
  • 1,867
  • 2
  • 24
  • 35
1
vote
2 answers

Setuptools: use build variants with different required packages

I want to make a source distribution (sdist), which needs to be different for the development and the target platform in terms of required packages. More concretely, when I package for the Raspberry Pi (target platform), I don't require…
Janos
  • 497
  • 5
  • 15
1
2 3