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

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

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

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

bos opened this issue May 24, 2012 · 4 comments

Comments

@bos
Copy link
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).

@bos
Copy link
Contributor Author

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
Copy link

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?

@23Skidoo
Copy link
Member

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.

@ghost ghost assigned 23Skidoo Apr 28, 2013
@23Skidoo
Copy link
Member

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

23Skidoo added a commit to 23Skidoo/cabal that referenced this issue May 1, 2013
23Skidoo added a commit to 23Skidoo/cabal that referenced this issue May 1, 2013
23Skidoo added a commit to 23Skidoo/cabal that referenced this issue May 1, 2013
23Skidoo added a commit to 23Skidoo/cabal that referenced this issue May 2, 2013
23Skidoo added a commit to 23Skidoo/cabal that referenced this issue May 2, 2013
23Skidoo added a commit to 23Skidoo/cabal that referenced this issue May 2, 2013
23Skidoo added a commit to 23Skidoo/cabal that referenced this issue May 2, 2013
23Skidoo added a commit to 23Skidoo/cabal that referenced this issue May 2, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants