packages feed

cabal-dev 0.9 → 0.9.1

raw patch · 3 files changed

+28/−106 lines, 3 filesdep −arraydep ~Cabaldep ~HTTPdep ~containerssetup-changednew-uploader

Dependencies removed: array

Dependency ranges changed: Cabal, HTTP, containers, filepath, network, pretty, test-framework

Files

Setup.hs view
@@ -12,37 +12,10 @@ import System.FilePath ( (</>) )  main = defaultMainWithHooks $-       simpleUserHooks { buildHook = getCabalInstallSource-                       , hookedPrograms = [cabalInstallProgram] }-+       simpleUserHooks { hookedPrograms = [cabalInstallProgram]+                       }  cabalInstallProgram :: Program cabalInstallProgram = (simpleProgram "cabal") {   programFindVersion = findProgramVersion "--numeric-version" id   }--getCabalInstallSource :: PackageDescription -> LocalBuildInfo -> UserHooks-                      -> BuildFlags -> IO ()-getCabalInstallSource pkgDesc lbi hooks flags =-  do -- cabal-install fails (exit 1) if the target unpack dir exists.-    exists <- doesDirectoryExist cabalInstallDir-    unless exists $ rawSystemExit v unpackCommand args-    buildHook simpleUserHooks updatedSrcDesc lbi hooks flags-  where v = buildVerbose flags-        unpackCommand = "cabal"-        srcDir        = buildDir lbi-        cabalInstallName  = "cabal-install-0.8.2"-        cabalInstallCabal = "cabal-install.cabal"-        cabalInstallDir   = srcDir </> cabalInstallName-        args            = ["unpack", "--dest="++srcDir, cabalInstallName]-        updatedSrcDesc  = addSrcDirs pkgDesc cabalInstallDir--addSrcDirs :: PackageDescription -> FilePath -> PackageDescription-addSrcDirs pkgDesc path =-  let notTargetTestExe exe = exeName exe /= "cabal-dev-test"-      updateExe exe | notTargetTestExe exe = id exe-                    | otherwise            = updateSrcDirs exe-      updateSrcDirs exe = exe {-          buildInfo = (buildInfo exe) {-             hsSourceDirs = (hsSourceDirs $ buildInfo exe) ++ [path] }}-  in pkgDesc { executables = map updateExe $ executables pkgDesc }
cabal-dev.cabal view
@@ -1,5 +1,5 @@ Name:                cabal-dev-Version:             0.9+Version:             0.9.1 Synopsis:            Manage sandboxed Haskell build environments  Description:         cabal-dev is a tool for managing development builds of@@ -24,21 +24,36 @@                      .                      @cabal-dev add-source@ also supports importing tarballs                      into a local cabal repository.+                     .+                     Alternatively, install unreleased dependencies into the+                     target cabal-dev sandbox instead of using @add-source@:+                     .+                     > cd /path/to/dependency+                     > cabal-dev install --sandobox=/path/to/sandbox+                     .+                     Then build your library/application with the specified+                     sandbox.+                     .+                     .+                     Additional documentation can be found in the README.md on+                     github:+                     .+                     http://github.com/creswick/cabal-dev/blob/master/README.md  License:             BSD3 License-file:        LICENSE Author:              Josh Hoyt, Jonathan Daugherty, Rogan Creswick Maintainer:          j3h@galois.com, jtd@galois.com, creswick@galois.com-Homepage:            https://github.com/creswick/cabal-dev-Bug-Reports:         https://github.com/creswick/cabal-dev/issues-Copyright:           2011 Galois, Inc.+Homepage:            http://github.com/creswick/cabal-dev+Bug-Reports:         http://github.com/creswick/cabal-dev/issues+Copyright:           2010-2012 Galois, Inc. Category:            Development Build-type:          Custom Cabal-version:       >=1.6 Data-Files:   admin/cabal-config.in,   admin/00-index.tar-Tested-with: GHC == 6.12.3, GHC == 6.10.4, GHC == 7.0.3+Tested-with: GHC == 6.12.3, GHC == 6.10.4, GHC == 7.0.3, GHC == 7.4.1  source-repository head   type:        git@@ -93,9 +108,9 @@     Build-depends:       bytestring >= 0.9 && < 0.10,       directory >= 1.0 && < 1.3,-      filepath >= 1.1 && < 1.3,-      Cabal >= 1.10.0.0 && < 1.13,-      HTTP >= 4000.0.9 && < 4000.2,+      filepath >= 1.1 && < 1.4,+      Cabal >= 1.10.0.0 && < 1.15,+      HTTP >= 4000.0.9 && < 4000.3,       mtl >= 1.1 && < 2.1,       network >= 2.2 && < 2.4,       pretty >= 1.0 && < 1.2,@@ -139,7 +154,7 @@   Main-is: GhcPkgCompat.hs   Build-Depends:     base < 5,-    Cabal >=1.2 && < 1.13+    Cabal >=1.2 && < 1.15    GHC-Options: -Wall   HS-Source-Dirs: src@@ -161,15 +176,9 @@     Build-depends:       MonadRandom >= 0.1 && < 0.2,       random >= 1 && < 1.1,-      test-framework >= 0.3 && < 0.4,+      test-framework >= 0.3 && < 0.6,       test-framework-hunit >= 0.2,-      HUnit >= 1.2 && <2,--- These dependencies are needed for the cabal-install--- code that is pulled in automatically by the userhooks-      containers >= 0.1 && < 0.4,-      network  >= 1        && < 3,-      array      >= 0.1 && < 0.4,-      pretty     >= 1   && < 1.1+      HUnit >= 1.2 && <2    if os(windows)      build-depends: Win32 >= 2.1  && < 2.3
test/RunTests.hs view
@@ -42,9 +42,6 @@ import Test.Framework.Providers.HUnit ( testCase ) import Test.HUnit ( (@?=) ) import qualified Test.HUnit as HUnit--import Distribution.Client.Config -- ( parseConfig )-import Distribution.Client.Setup ( GlobalFlags(..) ) import Distribution.Simple.InstallDirs import Distribution.Simple.Setup import Distribution.ParseUtils@@ -64,13 +61,6 @@       , testCase "Index tar files contain all contents" $         assertTarFileOk v p       ]-    , testGroup "Parsing and serializing" $-      [ testCase "simple round-trip test" $-        assertRoundTrip--      -- , testCase "sample echo test" $-      --   configEcho-      ]     ]  testBasicInvocation :: FilePath -> [Test]@@ -103,56 +93,6 @@             []     -> ("cabal-dev", [])    defaultMainWithArgs (tests normal cabalDev) testFrameworkArgs---- |Test that parsing and serializing a cabal-install SavedConfig with--- spaces in the paths preserves the spaces properly.------ This tests only a select few of the fields and leaves the rest--- empty. In practice, this has proven to be adequate.------ This is really just testing that cabal-install is capable of--- handling these fields. We have baked in knowledge of the syntax--- that these fields need into RewriteCabalConfig. Ideally,--- RewriteCabalConfig would read/write the data structure using the--- code from cabal-install. We haven't done that because pulling in--- all of the code from cabal-install into a production build is--- pretty hackish. I think that cabal-dev ought to be a fork or--- alternate build of cabal-install.------ Note that this test is the whole reason that we have the custom--- build type.-assertRoundTrip :: HUnit.Assertion-assertRoundTrip =-    do parsed <- case parseConfig mempty $ showConfig configWithSpaces of-                   ParseFailed err -> fail $ "Parse failed: " ++ show err-                   ParseOk _ val   -> return val--       let check msg f =-               (HUnit.assertEqual msg `on` f) parsed configWithSpaces--       check "globalLocalRepos" (globalLocalRepos . savedGlobalFlags)-       check "cache" (globalCacheDir . savedGlobalFlags)-       check "prefix" (show . prefix . savedUserInstallDirs)-       check "bindir" (show . bindir . savedUserInstallDirs)-       check "packageDB" (configPackageDB . savedConfigureFlags)-    where-      configWithSpaces =-          mempty { savedGlobalFlags =-                   mempty { globalLocalRepos = [pfx "repos"]-                          , globalCacheDir = toFlag $ pfx "cache"-                          }-                 , savedUserInstallDirs =-                   mempty { prefix = toFlag $ toPathTemplate $ pfx ""-                          , bindir = toFlag $ toPathTemplate $ pfx "binaries"-                          }-                 , savedConfigureFlags =-                   mempty { configPackageDB =-                            toFlag $ SpecificPackageDB $ pfx "package.db"-                          }-                 }--      pfx = ("/path with spaces" </>)-  assertProgramOutput :: (String -> Bool) -> FilePath -> [String]                     -> HUnit.Assertion