postgresql-binaries 0.0.1__tar.gz → 0.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: postgresql-binaries
3
- Version: 0.0.1
3
+ Version: 0.0.3
4
4
  Summary: PostgreSQL binaries for Linux, MacOS and Windows
5
5
  Author: Oli Russell
6
6
  Author-email: Oli Russell <mrxoliver@gmail.com>
@@ -12,7 +12,7 @@ Description-Content-Type: text/markdown
12
12
  Uses releases from [theseus-rs/postgresql-binaries](https://github.com/theseus-rs/postgresql-binaries) and publishes them to pypy, so that you can do:
13
13
 
14
14
  ```shell
15
- pip install postgresql-binaries@18.4.0
15
+ pip install postgresql-binaries==18.4.0
16
16
  ```
17
17
 
18
18
  Then eg.
@@ -30,4 +30,4 @@ cmd = [
30
30
  subprocess.check_call(cmd)
31
31
  ```
32
32
 
33
- On the first call to `bin()`, the archive baked into the wheel is unpacked.
33
+ On the first call to `bin()`, the archive baked into the wheel is unpacked in place.
@@ -3,7 +3,7 @@
3
3
  Uses releases from [theseus-rs/postgresql-binaries](https://github.com/theseus-rs/postgresql-binaries) and publishes them to pypy, so that you can do:
4
4
 
5
5
  ```shell
6
- pip install postgresql-binaries@18.4.0
6
+ pip install postgresql-binaries==18.4.0
7
7
  ```
8
8
 
9
9
  Then eg.
@@ -21,4 +21,4 @@ cmd = [
21
21
  subprocess.check_call(cmd)
22
22
  ```
23
23
 
24
- On the first call to `bin()`, the archive baked into the wheel is unpacked.
24
+ On the first call to `bin()`, the archive baked into the wheel is unpacked in place.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "postgresql-binaries"
3
- version = "0.0.1"
3
+ version = "0.0.3"
4
4
  description = "PostgreSQL binaries for Linux, MacOS and Windows"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -9,6 +9,12 @@ LIB = Path(__file__).parent
9
9
  def bin() -> Path:
10
10
  archive = next(LIB.glob("postgresql-*.tar.gz"))
11
11
  stem = archive.name[: -len(".tar.gz")]
12
+
13
+ # Clean up any previous versions
14
+ for existing in LIB.glob("postgresql-*"):
15
+ if existing.is_dir() and existing.name != stem:
16
+ existing.unlink()
17
+
12
18
  if not (LIB / stem).exists():
13
19
  with tarfile.open(archive, "r:gz") as tar:
14
20
  tar.extractall(path=LIB, filter="data")