Compare commits

..

2 Commits

Author SHA1 Message Date
T. R. Bernstein
1280d78aa2 Add Musl import support for static linking
Some checks failed
CI / verify-linuxmain (push) Has been cancelled
CI / apple (macos-10.15, iOS) (push) Has been cancelled
CI / apple (macos-10.15, macOS) (push) Has been cancelled
CI / apple (macos-10.15, tvOS) (push) Has been cancelled
CI / apple (macos-10.15, watchOS) (push) Has been cancelled
CI / apple (macos-11, iOS) (push) Has been cancelled
CI / apple (macos-11, macOS) (push) Has been cancelled
CI / apple (macos-11, tvOS) (push) Has been cancelled
CI / apple (macos-11, watchOS) (push) Has been cancelled
CI / linux (swift:4.2) (push) Has been cancelled
CI / linux (swift:5.0) (push) Has been cancelled
CI / linux (swift:5.1) (push) Has been cancelled
CI / linux (swift:5.2) (push) Has been cancelled
CI / linux (swift:5.3) (push) Has been cancelled
CI / linux (swift:5.4) (push) Has been cancelled
CI / linux (swiftlang/swift:nightly-5.5) (push) Has been cancelled
2026-04-17 04:21:29 +02:00
T. R. Bernstein
5d164c34f3 Adapt for new repository
Some checks failed
CI / verify-linuxmain (push) Has been cancelled
CI / apple (macos-10.15, iOS) (push) Has been cancelled
CI / apple (macos-10.15, macOS) (push) Has been cancelled
CI / apple (macos-10.15, tvOS) (push) Has been cancelled
CI / apple (macos-10.15, watchOS) (push) Has been cancelled
CI / apple (macos-11, iOS) (push) Has been cancelled
CI / apple (macos-11, macOS) (push) Has been cancelled
CI / apple (macos-11, tvOS) (push) Has been cancelled
CI / apple (macos-11, watchOS) (push) Has been cancelled
CI / linux (swift:4.2) (push) Has been cancelled
CI / linux (swift:5.0) (push) Has been cancelled
CI / linux (swift:5.1) (push) Has been cancelled
CI / linux (swift:5.2) (push) Has been cancelled
CI / linux (swift:5.3) (push) Has been cancelled
CI / linux (swift:5.4) (push) Has been cancelled
CI / linux (swiftlang/swift:nightly-5.5) (push) Has been cancelled
2025-09-30 17:25:19 +02:00
9 changed files with 26 additions and 19 deletions

View File

@@ -4,11 +4,11 @@ import PackageDescription
let package = Package(
name: "swiftpm-pathkit",
products: [
.library(name: "Path", targets: ["Path"]),
.library(name: "PathKit", targets: ["PathKit"]),
],
targets: [
.target(name: "Path", path: "Sources"),
.testTarget(name: "PathTests", dependencies: ["Path"]),
.target(name: "PathKit", path: "Sources"),
.testTarget(name: "PathTests", dependencies: ["PathKit"]),
],
swiftLanguageVersions: [.v4, .v4_2, .version("5")]
)

View File

@@ -12,7 +12,7 @@ results.
## Examples
```swift
import Path
import PathKit
// convenient static members
let home = Path.home

View File

@@ -1,6 +1,8 @@
import Foundation
#if os(Linux)
#if canImport(Glibc)
import Glibc
#elseif canImport(Musl)
import Musl
#endif
public extension Pathish {

View File

@@ -1,10 +1,13 @@
import Foundation
#if !os(Linux)
#if canImport(Darwin)
import func Darwin.realpath
let _realpath = Darwin.realpath
#else
#elseif canImport(Glibc)
import func Glibc.realpath
let _realpath = Glibc.realpath
#elseif canImport(Musl)
import func Musl.realpath
let _realpath = Musl.realpath
#endif
public typealias PathStruct = Path

View File

@@ -1,8 +1,10 @@
import Foundation
#if os(Linux)
import func Glibc.access
#else
#if canImport(Darwin)
import Darwin
#elseif canImport(Glibc)
import func Glibc.access
#elseif canImport(Musl)
import func Musl.access
#endif
public extension Pathish {

View File

@@ -1,5 +1,5 @@
import XCTest
import Path
import PathKit
extension PathTests {
func testFindMaxDepth1() throws {

View File

@@ -1,4 +1,4 @@
@testable import Path
@testable import PathKit
import func XCTest.XCTAssertEqual
import Foundation
import XCTest

View File

@@ -1,4 +1,4 @@
@testable import Path
@testable import PathKit
import Foundation
class TemporaryDirectory {

View File

@@ -1,5 +1,5 @@
import XCTest
import Path
import PathKit
#if swift(>=5.3)
func XCTAssertEqual<P: Pathish>(_ set1: Set<Path>, _ set2: Set<Path>, _ message: @autoclosure () -> String = "", file: StaticString = #filePath, line: UInt = #line, relativeTo: P) {