cabal sdist does not call the sdist build hook in custom Setup.hs #403

Closed
bos opened this Issue May 24, 2012 · 4 comments

Comments

Projects
None yet
3 participants
Contributor

bos commented May 24, 2012

(Imported from Trac #410, reported by @dcoutts on 2008-11-20)

The cabal sdist command only runs the default actions, it does not call the sdist hook that gets called if you runghc Setup sdist.

The problem is there is no external method for invoking the sdist hook. Calling ./setup sdist performs the whole action, but we only want to prepare the tree and not tar it up, since cabal sdist uses internal tar code rather than calling an external tar program (which typically does not exist on windows).

Contributor

bos commented May 24, 2012

(Imported comment by @dcoutts on 2008-11-20)

See #372.

What we need is for the command line interface to support generating a tarball image in a given location. That way an external tool like cabal-install can call it and then call tar itself.

jgm commented Jan 24, 2013

I just ran into this problem. I was stumped for quite a while wondering why my custom sdist hook wasn't working when I did cabal sdist, then I tried dist/setup/setup sdist and it worked. (Actually I don't need a custom sdist hook, but my Setup.hs uses hookedPreprocessors, adding a custom preprocessor for a new extension, and sdist needs to be aware of this.)

Any prospect of getting this fixed?

Member

23Skidoo commented Apr 28, 2013

Calling ./setup sdist performs the whole action, but we only want to prepare the tree and not tar it up

For sandboxes, we need a way to list all source files of a package. It'd be nice if one could run Setup sdist --list-sources to do that. Right now we do the same thing that cabal sdist does, which results in the same bug.

23Skidoo was assigned Apr 28, 2013

Member

23Skidoo commented Apr 28, 2013

I want to fix this for 1.18. Packages with custom preprocessors are really not uncommon.

@23Skidoo 23Skidoo added a commit to 23Skidoo/cabal that referenced this issue May 1, 2013

@23Skidoo @23Skidoo 23Skidoo + 23Skidoo Create source archives by running 'setup --output-directory'.
Fixes #403.
30810cb

@23Skidoo 23Skidoo added a commit to 23Skidoo/cabal that referenced this issue May 1, 2013

@23Skidoo @23Skidoo 23Skidoo + 23Skidoo Create source archives by running 'setup --output-directory'.
Fixes #403.
256b139

23Skidoo closed this in 356bae1 May 2, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment