-
Notifications
You must be signed in to change notification settings - Fork 140
Expand file tree
/
Copy pathdeploy_pip.ps1
More file actions
31 lines (24 loc) · 958 Bytes
/
deploy_pip.ps1
File metadata and controls
31 lines (24 loc) · 958 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Define the paths
$buildDir = "my_build"
$sourceDir = "ok"
# Remove the build directory if it exists
if (Test-Path -Path $buildDir) {
Remove-Item -Path $buildDir -Recurse -Force
Write-Output "Removed existing directory: $buildDir"
}
# Create the build directory
New-Item -Path $buildDir -ItemType "Directory"
Write-Output "Created new directory: $buildDir"
# Copy the contents of the source directory to the build directory
Copy-Item -Path "$sourceDir" -Destination $buildDir -Recurse
Write-Output "Copied contents from $sourceDir to $buildDir"
# Copy additional files
Copy-Item -Path "setup.py" -Destination $buildDir -Recurse
Copy-Item -Path "get_pypi_latest_version.py" -Destination $buildDir -Recurse
Copy-Item -Path "MANIFEST.in" -Destination $buildDir -Recurse
Copy-Item -Path "README.md" -Destination $buildDir -Recurse
# Change directory to the build directory
cd $buildDir
python setup.py sdist bdist_wheel
twine upload dist/*
cd ..